mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-09-03 13:32:41 -04:00
Compare commits
63 Commits
v2.6.20-rc
...
v2.6.20
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
62d0cfcb27 | ||
|
|
40c373cc3a | ||
|
|
886ae1fa13 | ||
|
|
ce35a81a71 | ||
|
|
259886a7c4 | ||
|
|
72253943f7 | ||
|
|
b2e895dbd8 | ||
|
|
8560a10e16 | ||
|
|
24d8f6aded | ||
|
|
29a002776b | ||
|
|
dee11c2364 | ||
|
|
3e8219806c | ||
|
|
40e0cb004a | ||
|
|
017f2e37ae | ||
|
|
e47fddf247 | ||
|
|
49c8042996 | ||
|
|
0777721c9b | ||
|
|
05c39e502e | ||
|
|
54494f3a83 | ||
|
|
7728098967 | ||
|
|
222335b755 | ||
|
|
7a18642224 | ||
|
|
6cdd12acb6 | ||
|
|
583243c062 | ||
|
|
719d96991a | ||
|
|
435f8a605d | ||
|
|
a55eb05a57 | ||
|
|
a53a33da86 | ||
|
|
ae2c27a78f | ||
|
|
b659f44e4e | ||
|
|
239a87c876 | ||
|
|
51bcf09291 | ||
|
|
e34efe3b10 | ||
|
|
fb594d31aa | ||
|
|
d346cce308 | ||
|
|
7d8952440f | ||
|
|
432bd6cbf9 | ||
|
|
6a4c24ec52 | ||
|
|
cb7468ef4c | ||
|
|
04add672cf | ||
|
|
9d6ed92196 | ||
|
|
b4cff8464b | ||
|
|
472ba91dd9 | ||
|
|
2a3d4f1f1f | ||
|
|
9abcf40b1d | ||
|
|
fc2dd2e51a | ||
|
|
eb79722717 | ||
|
|
aaba6d4bf6 | ||
|
|
e7bc537db9 | ||
|
|
190ff5b3a1 | ||
|
|
6fd6b17c6d | ||
|
|
a608ab9cb6 | ||
|
|
2e55302366 | ||
|
|
e533ca16f3 | ||
|
|
29556526b9 | ||
|
|
fa03ef38e1 | ||
|
|
adcb471110 | ||
|
|
7da5bfbb12 | ||
|
|
fb74a84160 | ||
|
|
24a1dec550 | ||
|
|
91614c054c | ||
|
|
477ffb9d87 | ||
|
|
938e2ac0b7 |
@@ -1,6 +1,6 @@
|
||||
Linux Magic System Request Key Hacks
|
||||
Documentation for sysrq.c version 1.15
|
||||
Last update: $Date: 2001/01/28 10:15:59 $
|
||||
Documentation for sysrq.c
|
||||
Last update: 2007-JAN-06
|
||||
|
||||
* What is the magic SysRq key?
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
@@ -35,7 +35,7 @@ You can set the value in the file by the following command:
|
||||
|
||||
Note that the value of /proc/sys/kernel/sysrq influences only the invocation
|
||||
via a keyboard. Invocation of any operation via /proc/sysrq-trigger is always
|
||||
allowed.
|
||||
allowed (by a user with admin privileges).
|
||||
|
||||
* How do I use the magic SysRq key?
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
@@ -58,7 +58,7 @@ On PowerPC - Press 'ALT - Print Screen (or F13) - <command key>,
|
||||
On other - If you know of the key combos for other architectures, please
|
||||
let me know so I can add them to this section.
|
||||
|
||||
On all - write a character to /proc/sysrq-trigger. eg:
|
||||
On all - write a character to /proc/sysrq-trigger. e.g.:
|
||||
|
||||
echo t > /proc/sysrq-trigger
|
||||
|
||||
@@ -74,6 +74,8 @@ On all - write a character to /proc/sysrq-trigger. eg:
|
||||
|
||||
'c' - Will perform a kexec reboot in order to take a crashdump.
|
||||
|
||||
'd' - Shows all locks that are held.
|
||||
|
||||
'o' - Will shut your system off (if configured and supported).
|
||||
|
||||
's' - Will attempt to sync all mounted filesystems.
|
||||
@@ -87,38 +89,43 @@ On all - write a character to /proc/sysrq-trigger. eg:
|
||||
|
||||
'm' - Will dump current memory info to your console.
|
||||
|
||||
'n' - Used to make RT tasks nice-able
|
||||
|
||||
'v' - Dumps Voyager SMP processor info to your console.
|
||||
|
||||
'w' - Dumps tasks that are in uninterruptable (blocked) state.
|
||||
|
||||
'x' - Used by xmon interface on ppc/powerpc platforms.
|
||||
|
||||
'0'-'9' - Sets the console log level, controlling which kernel messages
|
||||
will be printed to your console. ('0', for example would make
|
||||
it so that only emergency messages like PANICs or OOPSes would
|
||||
make it to your console.)
|
||||
|
||||
'f' - Will call oom_kill to kill a memory hog process
|
||||
'f' - Will call oom_kill to kill a memory hog process.
|
||||
|
||||
'e' - Send a SIGTERM to all processes, except for init.
|
||||
|
||||
'g' - Used by kgdb on ppc platforms.
|
||||
|
||||
'i' - Send a SIGKILL to all processes, except for init.
|
||||
|
||||
'l' - Send a SIGKILL to all processes, INCLUDING init. (Your system
|
||||
will be non-functional after this.)
|
||||
|
||||
'h' - Will display help ( actually any other key than those listed
|
||||
'h' - Will display help (actually any other key than those listed
|
||||
above will display help. but 'h' is easy to remember :-)
|
||||
|
||||
* Okay, so what can I use them for?
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Well, un'R'aw is very handy when your X server or a svgalib program crashes.
|
||||
|
||||
sa'K' (Secure Access Key) is useful when you want to be sure there are no
|
||||
trojan program is running at console and which could grab your password
|
||||
when you would try to login. It will kill all programs on given console
|
||||
and thus letting you make sure that the login prompt you see is actually
|
||||
sa'K' (Secure Access Key) is useful when you want to be sure there is no
|
||||
trojan program running at console which could grab your password
|
||||
when you would try to login. It will kill all programs on given console,
|
||||
thus letting you make sure that the login prompt you see is actually
|
||||
the one from init, not some trojan program.
|
||||
IMPORTANT: In its true form it is not a true SAK like the one in a :IMPORTANT
|
||||
IMPORTANT: c2 compliant system, and it should not be mistaken as :IMPORTANT
|
||||
IMPORTANT: such. :IMPORTANT
|
||||
It seems other find it useful as (System Attention Key) which is
|
||||
It seems others find it useful as (System Attention Key) which is
|
||||
useful when you want to exit a program that will not let you switch consoles.
|
||||
(For example, X or a svgalib program.)
|
||||
|
||||
@@ -139,8 +146,8 @@ OK or Done message...)
|
||||
Again, the unmount (remount read-only) hasn't taken place until you see the
|
||||
"OK" and "Done" message appear on the screen.
|
||||
|
||||
The loglevel'0'-'9' is useful when your console is being flooded with
|
||||
kernel messages you do not want to see. Setting '0' will prevent all but
|
||||
The loglevels '0'-'9' are useful when your console is being flooded with
|
||||
kernel messages you do not want to see. Selecting '0' will prevent all but
|
||||
the most urgent kernel messages from reaching your console. (They will
|
||||
still be logged if syslogd/klogd are alive, though.)
|
||||
|
||||
@@ -152,7 +159,7 @@ processes.
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
That happens to me, also. I've found that tapping shift, alt, and control
|
||||
on both sides of the keyboard, and hitting an invalid sysrq sequence again
|
||||
will fix the problem. (ie, something like alt-sysrq-z). Switching to another
|
||||
will fix the problem. (i.e., something like alt-sysrq-z). Switching to another
|
||||
virtual console (ALT+Fn) and then back again should also help.
|
||||
|
||||
* I hit SysRq, but nothing seems to happen, what's wrong?
|
||||
@@ -174,11 +181,11 @@ handler function you will use, B) a help_msg string, that will print when SysRQ
|
||||
prints help, and C) an action_msg string, that will print right before your
|
||||
handler is called. Your handler must conform to the prototype in 'sysrq.h'.
|
||||
|
||||
After the sysrq_key_op is created, you can call the macro
|
||||
register_sysrq_key(int key, struct sysrq_key_op *op_p) that is defined in
|
||||
sysrq.h, this will register the operation pointed to by 'op_p' at table
|
||||
key 'key', if that slot in the table is blank. At module unload time, you must
|
||||
call the macro unregister_sysrq_key(int key, struct sysrq_key_op *op_p), which
|
||||
After the sysrq_key_op is created, you can call the kernel function
|
||||
register_sysrq_key(int key, struct sysrq_key_op *op_p); this will
|
||||
register the operation pointed to by 'op_p' at table key 'key',
|
||||
if that slot in the table is blank. At module unload time, you must call
|
||||
the function unregister_sysrq_key(int key, struct sysrq_key_op *op_p), which
|
||||
will remove the key op pointed to by 'op_p' from the key 'key', if and only if
|
||||
it is currently registered in that slot. This is in case the slot has been
|
||||
overwritten since you registered it.
|
||||
@@ -186,15 +193,12 @@ overwritten since you registered it.
|
||||
The Magic SysRQ system works by registering key operations against a key op
|
||||
lookup table, which is defined in 'drivers/char/sysrq.c'. This key table has
|
||||
a number of operations registered into it at compile time, but is mutable,
|
||||
and 4 functions are exported for interface to it: __sysrq_lock_table,
|
||||
__sysrq_unlock_table, __sysrq_get_key_op, and __sysrq_put_key_op. The
|
||||
functions __sysrq_swap_key_ops and __sysrq_swap_key_ops_nolock are defined
|
||||
in the header itself, and the REGISTER and UNREGISTER macros are built from
|
||||
these. More complex (and dangerous!) manipulations of the table are possible
|
||||
using these functions, but you must be careful to always lock the table before
|
||||
you read or write from it, and to unlock it again when you are done. (And of
|
||||
course, to never ever leave an invalid pointer in the table). Null pointers in
|
||||
the table are always safe :)
|
||||
and 2 functions are exported for interface to it:
|
||||
register_sysrq_key and unregister_sysrq_key.
|
||||
Of course, never ever leave an invalid pointer in the table. I.e., when
|
||||
your module that called register_sysrq_key() exits, it must call
|
||||
unregister_sysrq_key() to clean up the sysrq key table entry that it used.
|
||||
Null pointers in the table are always safe. :)
|
||||
|
||||
If for some reason you feel the need to call the handle_sysrq function from
|
||||
within a function called by handle_sysrq, you must be aware that you are in
|
||||
|
||||
14
MAINTAINERS
14
MAINTAINERS
@@ -598,8 +598,6 @@ W: http://linux-atm.sourceforge.net
|
||||
S: Maintained
|
||||
|
||||
ATMEL MACB ETHERNET DRIVER
|
||||
P: Atmel AVR32 Support Team
|
||||
M: avr32@atmel.com
|
||||
P: Haavard Skinnemoen
|
||||
M: hskinnemoen@atmel.com
|
||||
S: Supported
|
||||
@@ -620,8 +618,6 @@ T: git kernel.org:/pub/scm/linux/kernel/git/dwmw2/audit-2.6.git
|
||||
S: Maintained
|
||||
|
||||
AVR32 ARCHITECTURE
|
||||
P: Atmel AVR32 Support Team
|
||||
M: avr32@atmel.com
|
||||
P: Haavard Skinnemoen
|
||||
M: hskinnemoen@atmel.com
|
||||
W: http://www.atmel.com/products/AVR32/
|
||||
@@ -630,8 +626,6 @@ W: http://avrfreaks.net/
|
||||
S: Supported
|
||||
|
||||
AVR32/AT32AP MACHINE SUPPORT
|
||||
P: Atmel AVR32 Support Team
|
||||
M: avr32@atmel.com
|
||||
P: Haavard Skinnemoen
|
||||
M: hskinnemoen@atmel.com
|
||||
S: Supported
|
||||
@@ -2288,7 +2282,7 @@ P: Jozsef Kadlecsik
|
||||
P: Patrick McHardy
|
||||
M: kaber@trash.net
|
||||
L: netfilter-devel@lists.netfilter.org
|
||||
L: netfilter@lists.netfilter.org
|
||||
L: netfilter@lists.netfilter.org (subscribers-only)
|
||||
L: coreteam@netfilter.org
|
||||
W: http://www.netfilter.org/
|
||||
W: http://www.iptables.org/
|
||||
@@ -3599,6 +3593,12 @@ M: ysato@users.sourceforge.jp
|
||||
W: http://uclinux-h8.sourceforge.jp/
|
||||
S: Supported
|
||||
|
||||
UFS FILESYSTEM
|
||||
P: Evgeniy Dushistov
|
||||
M: dushistov@mail.ru
|
||||
L: linux-kernel@vger.kernel.org
|
||||
S: Maintained
|
||||
|
||||
USB DIAMOND RIO500 DRIVER
|
||||
P: Cesar Miquel
|
||||
M: miquel@df.uba.ar
|
||||
|
||||
2
Makefile
2
Makefile
@@ -1,7 +1,7 @@
|
||||
VERSION = 2
|
||||
PATCHLEVEL = 6
|
||||
SUBLEVEL = 20
|
||||
EXTRAVERSION =-rc7
|
||||
EXTRAVERSION =
|
||||
NAME = Homicidal Dwarf Hamster
|
||||
|
||||
# *DOCUMENTATION*
|
||||
|
||||
@@ -43,6 +43,8 @@ static int is_safe_abs_reloc(const char* sym_name)
|
||||
/* Match found */
|
||||
return 1;
|
||||
}
|
||||
if (strncmp(sym_name, "__crc_", 6) == 0)
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -173,7 +173,7 @@ static void __cpuinit geode_configure(void)
|
||||
ccr4 = getCx86(CX86_CCR4);
|
||||
ccr4 |= 0x38; /* FPU fast, DTE cache, Mem bypass */
|
||||
|
||||
setCx86(CX86_CCR4, ccr4);
|
||||
setCx86(CX86_CCR3, ccr3);
|
||||
|
||||
set_cx86_memwb();
|
||||
set_cx86_reorder();
|
||||
|
||||
@@ -472,6 +472,70 @@ static inline void __init check_range_for_systab(efi_memory_desc_t *md)
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Wrap all the virtual calls in a way that forces the parameters on the stack.
|
||||
*/
|
||||
|
||||
#define efi_call_virt(f, args...) \
|
||||
((efi_##f##_t __attribute__((regparm(0)))*)efi.systab->runtime->f)(args)
|
||||
|
||||
static efi_status_t virt_efi_get_time(efi_time_t *tm, efi_time_cap_t *tc)
|
||||
{
|
||||
return efi_call_virt(get_time, tm, tc);
|
||||
}
|
||||
|
||||
static efi_status_t virt_efi_set_time (efi_time_t *tm)
|
||||
{
|
||||
return efi_call_virt(set_time, tm);
|
||||
}
|
||||
|
||||
static efi_status_t virt_efi_get_wakeup_time (efi_bool_t *enabled,
|
||||
efi_bool_t *pending,
|
||||
efi_time_t *tm)
|
||||
{
|
||||
return efi_call_virt(get_wakeup_time, enabled, pending, tm);
|
||||
}
|
||||
|
||||
static efi_status_t virt_efi_set_wakeup_time (efi_bool_t enabled,
|
||||
efi_time_t *tm)
|
||||
{
|
||||
return efi_call_virt(set_wakeup_time, enabled, tm);
|
||||
}
|
||||
|
||||
static efi_status_t virt_efi_get_variable (efi_char16_t *name,
|
||||
efi_guid_t *vendor, u32 *attr,
|
||||
unsigned long *data_size, void *data)
|
||||
{
|
||||
return efi_call_virt(get_variable, name, vendor, attr, data_size, data);
|
||||
}
|
||||
|
||||
static efi_status_t virt_efi_get_next_variable (unsigned long *name_size,
|
||||
efi_char16_t *name,
|
||||
efi_guid_t *vendor)
|
||||
{
|
||||
return efi_call_virt(get_next_variable, name_size, name, vendor);
|
||||
}
|
||||
|
||||
static efi_status_t virt_efi_set_variable (efi_char16_t *name,
|
||||
efi_guid_t *vendor,
|
||||
unsigned long attr,
|
||||
unsigned long data_size, void *data)
|
||||
{
|
||||
return efi_call_virt(set_variable, name, vendor, attr, data_size, data);
|
||||
}
|
||||
|
||||
static efi_status_t virt_efi_get_next_high_mono_count (u32 *count)
|
||||
{
|
||||
return efi_call_virt(get_next_high_mono_count, count);
|
||||
}
|
||||
|
||||
static void virt_efi_reset_system (int reset_type, efi_status_t status,
|
||||
unsigned long data_size,
|
||||
efi_char16_t *data)
|
||||
{
|
||||
efi_call_virt(reset_system, reset_type, status, data_size, data);
|
||||
}
|
||||
|
||||
/*
|
||||
* This function will switch the EFI runtime services to virtual mode.
|
||||
* Essentially, look through the EFI memmap and map every region that
|
||||
@@ -525,22 +589,15 @@ void __init efi_enter_virtual_mode(void)
|
||||
* pointers in the runtime service table to the new virtual addresses.
|
||||
*/
|
||||
|
||||
efi.get_time = (efi_get_time_t *) efi.systab->runtime->get_time;
|
||||
efi.set_time = (efi_set_time_t *) efi.systab->runtime->set_time;
|
||||
efi.get_wakeup_time = (efi_get_wakeup_time_t *)
|
||||
efi.systab->runtime->get_wakeup_time;
|
||||
efi.set_wakeup_time = (efi_set_wakeup_time_t *)
|
||||
efi.systab->runtime->set_wakeup_time;
|
||||
efi.get_variable = (efi_get_variable_t *)
|
||||
efi.systab->runtime->get_variable;
|
||||
efi.get_next_variable = (efi_get_next_variable_t *)
|
||||
efi.systab->runtime->get_next_variable;
|
||||
efi.set_variable = (efi_set_variable_t *)
|
||||
efi.systab->runtime->set_variable;
|
||||
efi.get_next_high_mono_count = (efi_get_next_high_mono_count_t *)
|
||||
efi.systab->runtime->get_next_high_mono_count;
|
||||
efi.reset_system = (efi_reset_system_t *)
|
||||
efi.systab->runtime->reset_system;
|
||||
efi.get_time = virt_efi_get_time;
|
||||
efi.set_time = virt_efi_set_time;
|
||||
efi.get_wakeup_time = virt_efi_get_wakeup_time;
|
||||
efi.set_wakeup_time = virt_efi_set_wakeup_time;
|
||||
efi.get_variable = virt_efi_get_variable;
|
||||
efi.get_next_variable = virt_efi_get_next_variable;
|
||||
efi.set_variable = virt_efi_set_variable;
|
||||
efi.get_next_high_mono_count = virt_efi_get_next_high_mono_count;
|
||||
efi.reset_system = virt_efi_reset_system;
|
||||
}
|
||||
|
||||
void __init
|
||||
|
||||
@@ -102,7 +102,7 @@ void __init time_init_hook(void)
|
||||
* along the MCA bus. Use this to hook into that chain if you will need
|
||||
* it.
|
||||
**/
|
||||
void __init mca_nmi_hook(void)
|
||||
void mca_nmi_hook(void)
|
||||
{
|
||||
/* If I recall correctly, there's a whole bunch of other things that
|
||||
* we can do to check for NMI problems, but that's all I know about
|
||||
|
||||
@@ -609,6 +609,9 @@ EXPORT_SYMBOL(acpi_register_gsi);
|
||||
|
||||
void acpi_unregister_gsi(u32 gsi)
|
||||
{
|
||||
if (acpi_irq_model == ACPI_IRQ_MODEL_PLATFORM)
|
||||
return;
|
||||
|
||||
iosapic_unregister_intr(gsi);
|
||||
}
|
||||
|
||||
|
||||
@@ -122,6 +122,9 @@ static void migrate_irqs(void)
|
||||
for (irq=0; irq < NR_IRQS; irq++) {
|
||||
desc = irq_desc + irq;
|
||||
|
||||
if (desc->status == IRQ_DISABLED)
|
||||
continue;
|
||||
|
||||
/*
|
||||
* No handling for now.
|
||||
* TBD: Implement a disable function so we can now
|
||||
|
||||
@@ -292,8 +292,8 @@ int setup_profiling_timer(unsigned int multiplier)
|
||||
|
||||
void __init smp_prepare_cpus(unsigned int max_cpus)
|
||||
{
|
||||
extern void smp4m_boot_cpus(void);
|
||||
extern void smp4d_boot_cpus(void);
|
||||
extern void __init smp4m_boot_cpus(void);
|
||||
extern void __init smp4d_boot_cpus(void);
|
||||
int i, cpuid, extra;
|
||||
|
||||
printk("Entering SMP Mode...\n");
|
||||
@@ -375,8 +375,8 @@ void __init smp_prepare_boot_cpu(void)
|
||||
|
||||
int __cpuinit __cpu_up(unsigned int cpu)
|
||||
{
|
||||
extern int smp4m_boot_one_cpu(int);
|
||||
extern int smp4d_boot_one_cpu(int);
|
||||
extern int __cpuinit smp4m_boot_one_cpu(int);
|
||||
extern int __cpuinit smp4d_boot_one_cpu(int);
|
||||
int ret=0;
|
||||
|
||||
switch(sparc_cpu_model) {
|
||||
|
||||
@@ -164,7 +164,7 @@ void __init smp4d_boot_cpus(void)
|
||||
local_flush_cache_all();
|
||||
}
|
||||
|
||||
int smp4d_boot_one_cpu(int i)
|
||||
int __cpuinit smp4d_boot_one_cpu(int i)
|
||||
{
|
||||
extern unsigned long sun4d_cpu_startup;
|
||||
unsigned long *entry = &sun4d_cpu_startup;
|
||||
|
||||
@@ -1250,6 +1250,7 @@ unsigned ata_exec_internal_sg(struct ata_device *dev,
|
||||
|
||||
ata_sg_init(qc, sg, n_elem);
|
||||
qc->nsect = buflen / ATA_SECT_SIZE;
|
||||
qc->nbytes = buflen;
|
||||
}
|
||||
|
||||
qc->private_data = &wait;
|
||||
|
||||
@@ -36,15 +36,22 @@ enum {
|
||||
static int atiixp_pre_reset(struct ata_port *ap)
|
||||
{
|
||||
struct pci_dev *pdev = to_pci_dev(ap->host->dev);
|
||||
static struct pci_bits atiixp_enable_bits[] = {
|
||||
static const struct pci_bits atiixp_enable_bits[] = {
|
||||
{ 0x48, 1, 0x01, 0x00 },
|
||||
{ 0x48, 1, 0x08, 0x00 }
|
||||
};
|
||||
u8 udma;
|
||||
|
||||
if (!pci_test_config_bits(pdev, &atiixp_enable_bits[ap->port_no]))
|
||||
return -ENOENT;
|
||||
|
||||
ap->cbl = ATA_CBL_PATA80;
|
||||
/* Hack from drivers/ide/pci. Really we want to know how to do the
|
||||
raw detection not play follow the bios mode guess */
|
||||
pci_read_config_byte(pdev, ATIIXP_IDE_UDMA_MODE + ap->port_no, &udma);
|
||||
if ((udma & 0x07) >= 0x04 || (udma & 0x70) >= 0x40)
|
||||
ap->cbl = ATA_CBL_PATA80;
|
||||
else
|
||||
ap->cbl = ATA_CBL_PATA40;
|
||||
return ata_std_prereset(ap);
|
||||
}
|
||||
|
||||
|
||||
@@ -204,20 +204,12 @@ static int jmicron_init_one (struct pci_dev *pdev, const struct pci_device_id *i
|
||||
|
||||
u32 reg;
|
||||
|
||||
if (id->driver_data != 368) {
|
||||
/* Put the controller into AHCI mode in case the AHCI driver
|
||||
has not yet been loaded. This can be done with either
|
||||
function present */
|
||||
/* PATA controller is fn 1, AHCI is fn 0 */
|
||||
if (id->driver_data != 368 && PCI_FUNC(pdev->devfn) != 1)
|
||||
return -ENODEV;
|
||||
|
||||
/* FIXME: We may want a way to override this in future */
|
||||
pci_write_config_byte(pdev, 0x41, 0xa1);
|
||||
|
||||
/* PATA controller is fn 1, AHCI is fn 0 */
|
||||
if (PCI_FUNC(pdev->devfn) != 1)
|
||||
return -ENODEV;
|
||||
}
|
||||
if ( id->driver_data == 365 || id->driver_data == 366) {
|
||||
/* The 365/66 have two PATA channels, redirect the second */
|
||||
/* The 365/66 have two PATA channels, redirect the second */
|
||||
if (id->driver_data == 365 || id->driver_data == 366) {
|
||||
pci_read_config_dword(pdev, 0x80, ®);
|
||||
reg |= (1 << 24); /* IDE1 to PATA IDE secondary */
|
||||
pci_write_config_dword(pdev, 0x80, reg);
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
* VIA VT8233c - UDMA100
|
||||
* VIA VT8235 - UDMA133
|
||||
* VIA VT8237 - UDMA133
|
||||
* VIA VT8237S - UDMA133
|
||||
* VIA VT8251 - UDMA133
|
||||
*
|
||||
* Most registers remain compatible across chips. Others start reserved
|
||||
@@ -61,7 +62,7 @@
|
||||
#include <linux/libata.h>
|
||||
|
||||
#define DRV_NAME "pata_via"
|
||||
#define DRV_VERSION "0.2.0"
|
||||
#define DRV_VERSION "0.2.1"
|
||||
|
||||
/*
|
||||
* The following comes directly from Vojtech Pavlik's ide/pci/via82cxxx
|
||||
|
||||
@@ -215,7 +215,7 @@ static void sysrq_handle_showstate_blocked(int key, struct tty_struct *tty)
|
||||
}
|
||||
static struct sysrq_key_op sysrq_showstate_blocked_op = {
|
||||
.handler = sysrq_handle_showstate_blocked,
|
||||
.help_msg = "showBlockedTasks",
|
||||
.help_msg = "shoW-blocked-tasks",
|
||||
.action_msg = "Show Blocked State",
|
||||
.enable_mask = SYSRQ_ENABLE_DUMP,
|
||||
};
|
||||
@@ -315,15 +315,16 @@ static struct sysrq_key_op *sysrq_key_table[36] = {
|
||||
&sysrq_loglevel_op, /* 9 */
|
||||
|
||||
/*
|
||||
* Don't use for system provided sysrqs, it is handled specially on
|
||||
* sparc and will never arrive
|
||||
* a: Don't use for system provided sysrqs, it is handled specially on
|
||||
* sparc and will never arrive.
|
||||
*/
|
||||
NULL, /* a */
|
||||
&sysrq_reboot_op, /* b */
|
||||
&sysrq_crashdump_op, /* c */
|
||||
&sysrq_crashdump_op, /* c & ibm_emac driver debug */
|
||||
&sysrq_showlocks_op, /* d */
|
||||
&sysrq_term_op, /* e */
|
||||
&sysrq_moom_op, /* f */
|
||||
/* g: May be registered by ppc for kgdb */
|
||||
NULL, /* g */
|
||||
NULL, /* h */
|
||||
&sysrq_kill_op, /* i */
|
||||
@@ -332,18 +333,19 @@ static struct sysrq_key_op *sysrq_key_table[36] = {
|
||||
NULL, /* l */
|
||||
&sysrq_showmem_op, /* m */
|
||||
&sysrq_unrt_op, /* n */
|
||||
/* This will often be registered as 'Off' at init time */
|
||||
/* o: This will often be registered as 'Off' at init time */
|
||||
NULL, /* o */
|
||||
&sysrq_showregs_op, /* p */
|
||||
NULL, /* q */
|
||||
&sysrq_unraw_op, /* r */
|
||||
&sysrq_unraw_op, /* r */
|
||||
&sysrq_sync_op, /* s */
|
||||
&sysrq_showstate_op, /* t */
|
||||
&sysrq_mountro_op, /* u */
|
||||
/* May be assigned at init time by SMP VOYAGER */
|
||||
/* v: May be registered at init time by SMP VOYAGER */
|
||||
NULL, /* v */
|
||||
NULL, /* w */
|
||||
&sysrq_showstate_blocked_op, /* x */
|
||||
&sysrq_showstate_blocked_op, /* w */
|
||||
/* x: May be registered on ppc/powerpc for xmon */
|
||||
NULL, /* x */
|
||||
NULL, /* y */
|
||||
NULL /* z */
|
||||
};
|
||||
|
||||
@@ -1781,9 +1781,9 @@ static int __init ide_setup(char *s)
|
||||
return 1;
|
||||
}
|
||||
|
||||
extern void pnpide_init(void);
|
||||
extern void pnpide_exit(void);
|
||||
extern void h8300_ide_init(void);
|
||||
extern void __init pnpide_init(void);
|
||||
extern void __exit pnpide_exit(void);
|
||||
extern void __init h8300_ide_init(void);
|
||||
|
||||
/*
|
||||
* probe_for_hwifs() finds/initializes "known" IDE interfaces
|
||||
@@ -2088,7 +2088,7 @@ int __init init_module (void)
|
||||
return ide_init();
|
||||
}
|
||||
|
||||
void cleanup_module (void)
|
||||
void __exit cleanup_module (void)
|
||||
{
|
||||
int index;
|
||||
|
||||
|
||||
@@ -78,7 +78,7 @@ static struct via_isa_bridge {
|
||||
u8 rev_max;
|
||||
u16 flags;
|
||||
} via_isa_bridges[] = {
|
||||
{ "cx7000", PCI_DEVICE_ID_VIA_CX700, 0x00, 0x2f, VIA_UDMA_133 | VIA_BAD_AST },
|
||||
{ "cx700", PCI_DEVICE_ID_VIA_CX700, 0x00, 0x2f, VIA_UDMA_133 | VIA_BAD_AST },
|
||||
{ "vt8237s", PCI_DEVICE_ID_VIA_8237S, 0x00, 0x2f, VIA_UDMA_133 | VIA_BAD_AST },
|
||||
{ "vt6410", PCI_DEVICE_ID_VIA_6410, 0x00, 0x2f, VIA_UDMA_133 | VIA_BAD_AST },
|
||||
{ "vt8251", PCI_DEVICE_ID_VIA_8251, 0x00, 0x2f, VIA_UDMA_133 | VIA_BAD_AST },
|
||||
|
||||
@@ -1116,6 +1116,8 @@ static int vmx_vcpu_setup(struct kvm_vcpu *vcpu)
|
||||
|
||||
if (rdmsr_safe(index, &data_low, &data_high) < 0)
|
||||
continue;
|
||||
if (wrmsr_safe(index, data_low, data_high) < 0)
|
||||
continue;
|
||||
data = data_low | ((u64)data_high << 32);
|
||||
vcpu->host_msrs[j].index = index;
|
||||
vcpu->host_msrs[j].reserved = 0;
|
||||
|
||||
@@ -57,8 +57,8 @@
|
||||
|
||||
#define DRV_MODULE_NAME "bnx2"
|
||||
#define PFX DRV_MODULE_NAME ": "
|
||||
#define DRV_MODULE_VERSION "1.5.4"
|
||||
#define DRV_MODULE_RELDATE "January 24, 2007"
|
||||
#define DRV_MODULE_VERSION "1.5.5"
|
||||
#define DRV_MODULE_RELDATE "February 1, 2007"
|
||||
|
||||
#define RUN_AT(x) (jiffies + (x))
|
||||
|
||||
@@ -1356,6 +1356,14 @@ bnx2_init_copper_phy(struct bnx2 *bp)
|
||||
bnx2_write_phy(bp, 0x18, 0x0400);
|
||||
}
|
||||
|
||||
if (bp->phy_flags & PHY_DIS_EARLY_DAC_FLAG) {
|
||||
bnx2_write_phy(bp, MII_BNX2_DSP_ADDRESS,
|
||||
MII_BNX2_DSP_EXPAND_REG | 0x8);
|
||||
bnx2_read_phy(bp, MII_BNX2_DSP_RW_PORT, &val);
|
||||
val &= ~(1 << 8);
|
||||
bnx2_write_phy(bp, MII_BNX2_DSP_RW_PORT, val);
|
||||
}
|
||||
|
||||
if (bp->dev->mtu > 1500) {
|
||||
/* Set extended packet length bit */
|
||||
bnx2_write_phy(bp, 0x18, 0x7);
|
||||
@@ -5918,6 +5926,8 @@ bnx2_init_board(struct pci_dev *pdev, struct net_device *dev)
|
||||
} else if (CHIP_NUM(bp) == CHIP_NUM_5706 ||
|
||||
CHIP_NUM(bp) == CHIP_NUM_5708)
|
||||
bp->phy_flags |= PHY_CRC_FIX_FLAG;
|
||||
else if (CHIP_ID(bp) == CHIP_ID_5709_A0)
|
||||
bp->phy_flags |= PHY_DIS_EARLY_DAC_FLAG;
|
||||
|
||||
if ((CHIP_ID(bp) == CHIP_ID_5708_A0) ||
|
||||
(CHIP_ID(bp) == CHIP_ID_5708_B0) ||
|
||||
|
||||
@@ -6288,6 +6288,10 @@ struct l2_fhdr {
|
||||
|
||||
#define BCM5708S_TX_ACTL3 0x17
|
||||
|
||||
#define MII_BNX2_DSP_RW_PORT 0x15
|
||||
#define MII_BNX2_DSP_ADDRESS 0x17
|
||||
#define MII_BNX2_DSP_EXPAND_REG 0x0f00
|
||||
|
||||
#define MIN_ETHERNET_PACKET_SIZE 60
|
||||
#define MAX_ETHERNET_PACKET_SIZE 1514
|
||||
#define MAX_ETHERNET_JUMBO_PACKET_SIZE 9014
|
||||
@@ -6489,6 +6493,7 @@ struct bnx2 {
|
||||
#define PHY_INT_MODE_MASK_FLAG 0x300
|
||||
#define PHY_INT_MODE_AUTO_POLLING_FLAG 0x100
|
||||
#define PHY_INT_MODE_LINK_READY_FLAG 0x200
|
||||
#define PHY_DIS_EARLY_DAC_FLAG 0x400
|
||||
|
||||
u32 chip_id;
|
||||
/* chip num:16-31, rev:12-15, metal:4-11, bond_id:0-3 */
|
||||
@@ -6512,6 +6517,7 @@ struct bnx2 {
|
||||
#define CHIP_ID_5708_A0 0x57080000
|
||||
#define CHIP_ID_5708_B0 0x57081000
|
||||
#define CHIP_ID_5708_B1 0x57081010
|
||||
#define CHIP_ID_5709_A0 0x57090000
|
||||
|
||||
#define CHIP_BOND_ID(bp) (((bp)->chip_id) & 0xf)
|
||||
|
||||
|
||||
@@ -2718,14 +2718,12 @@ static int e100_suspend(struct pci_dev *pdev, pm_message_t state)
|
||||
struct net_device *netdev = pci_get_drvdata(pdev);
|
||||
struct nic *nic = netdev_priv(netdev);
|
||||
|
||||
#ifdef CONFIG_E100_NAPI
|
||||
if (netif_running(netdev))
|
||||
netif_poll_disable(nic->netdev);
|
||||
#endif
|
||||
del_timer_sync(&nic->watchdog);
|
||||
netif_carrier_off(nic->netdev);
|
||||
|
||||
netif_device_detach(netdev);
|
||||
|
||||
pci_save_state(pdev);
|
||||
|
||||
if ((nic->flags & wol_magic) | e100_asf(nic)) {
|
||||
@@ -2761,16 +2759,13 @@ static int e100_resume(struct pci_dev *pdev)
|
||||
}
|
||||
#endif /* CONFIG_PM */
|
||||
|
||||
|
||||
static void e100_shutdown(struct pci_dev *pdev)
|
||||
{
|
||||
struct net_device *netdev = pci_get_drvdata(pdev);
|
||||
struct nic *nic = netdev_priv(netdev);
|
||||
|
||||
#ifdef CONFIG_E100_NAPI
|
||||
if (netif_running(netdev))
|
||||
netif_poll_disable(nic->netdev);
|
||||
#endif
|
||||
del_timer_sync(&nic->watchdog);
|
||||
netif_carrier_off(nic->netdev);
|
||||
|
||||
|
||||
@@ -113,7 +113,7 @@ config SCC_TRXECHO
|
||||
|
||||
config BAYCOM_SER_FDX
|
||||
tristate "BAYCOM ser12 fullduplex driver for AX.25"
|
||||
depends on AX25
|
||||
depends on AX25 && !S390
|
||||
select CRC_CCITT
|
||||
---help---
|
||||
This is one of two drivers for Baycom style simple amateur radio
|
||||
@@ -133,7 +133,7 @@ config BAYCOM_SER_FDX
|
||||
|
||||
config BAYCOM_SER_HDX
|
||||
tristate "BAYCOM ser12 halfduplex driver for AX.25"
|
||||
depends on AX25
|
||||
depends on AX25 && !S390
|
||||
select CRC_CCITT
|
||||
---help---
|
||||
This is one of two drivers for Baycom style simple amateur radio
|
||||
@@ -181,7 +181,7 @@ config BAYCOM_EPP
|
||||
|
||||
config YAM
|
||||
tristate "YAM driver for AX.25"
|
||||
depends on AX25
|
||||
depends on AX25 && !S390
|
||||
help
|
||||
The YAM is a modem for packet radio which connects to the serial
|
||||
port and includes some of the functions of a Terminal Node
|
||||
|
||||
@@ -239,49 +239,39 @@ extern unsigned long long netxen_dma_mask;
|
||||
|
||||
typedef u32 netxen_ctx_msg;
|
||||
|
||||
#define _netxen_set_bits(config_word, start, bits, val) {\
|
||||
unsigned long long mask = (((1ULL << (bits)) - 1) << (start)); \
|
||||
unsigned long long value = (val); \
|
||||
(config_word) &= ~mask; \
|
||||
(config_word) |= (((value) << (start)) & mask); \
|
||||
}
|
||||
|
||||
#define netxen_set_msg_peg_id(config_word, val) \
|
||||
_netxen_set_bits(config_word, 0, 2, val)
|
||||
((config_word) &= ~3, (config_word) |= val & 3)
|
||||
#define netxen_set_msg_privid(config_word) \
|
||||
set_bit(2, (unsigned long*)&config_word)
|
||||
((config_word) |= 1 << 2)
|
||||
#define netxen_set_msg_count(config_word, val) \
|
||||
_netxen_set_bits(config_word, 3, 15, val)
|
||||
((config_word) &= ~(0x7fff<<3), (config_word) |= (val & 0x7fff) << 3)
|
||||
#define netxen_set_msg_ctxid(config_word, val) \
|
||||
_netxen_set_bits(config_word, 18, 10, val)
|
||||
((config_word) &= ~(0x3ff<<18), (config_word) |= (val & 0x3ff) << 18)
|
||||
#define netxen_set_msg_opcode(config_word, val) \
|
||||
_netxen_set_bits(config_word, 28, 4, val)
|
||||
((config_word) &= ~(0xf<<24), (config_word) |= (val & 0xf) << 24)
|
||||
|
||||
struct netxen_rcv_context {
|
||||
u32 rcv_ring_addr_lo;
|
||||
u32 rcv_ring_addr_hi;
|
||||
u32 rcv_ring_size;
|
||||
u32 rsrvd;
|
||||
__le64 rcv_ring_addr;
|
||||
__le32 rcv_ring_size;
|
||||
__le32 rsrvd;
|
||||
};
|
||||
|
||||
struct netxen_ring_ctx {
|
||||
|
||||
/* one command ring */
|
||||
u64 cmd_consumer_offset;
|
||||
u32 cmd_ring_addr_lo;
|
||||
u32 cmd_ring_addr_hi;
|
||||
u32 cmd_ring_size;
|
||||
u32 rsrvd;
|
||||
__le64 cmd_consumer_offset;
|
||||
__le64 cmd_ring_addr;
|
||||
__le32 cmd_ring_size;
|
||||
__le32 rsrvd;
|
||||
|
||||
/* three receive rings */
|
||||
struct netxen_rcv_context rcv_ctx[3];
|
||||
|
||||
/* one status ring */
|
||||
u32 sts_ring_addr_lo;
|
||||
u32 sts_ring_addr_hi;
|
||||
u32 sts_ring_size;
|
||||
__le64 sts_ring_addr;
|
||||
__le32 sts_ring_size;
|
||||
|
||||
u32 ctx_id;
|
||||
__le32 ctx_id;
|
||||
} __attribute__ ((aligned(64)));
|
||||
|
||||
/*
|
||||
@@ -305,81 +295,85 @@ struct netxen_ring_ctx {
|
||||
((cmd_desc)->port_ctxid |= ((var) & 0x0F))
|
||||
|
||||
#define netxen_set_cmd_desc_flags(cmd_desc, val) \
|
||||
_netxen_set_bits((cmd_desc)->flags_opcode, 0, 7, val)
|
||||
((cmd_desc)->flags_opcode &= ~cpu_to_le16(0x7f), \
|
||||
(cmd_desc)->flags_opcode |= cpu_to_le16((val) & 0x7f))
|
||||
#define netxen_set_cmd_desc_opcode(cmd_desc, val) \
|
||||
_netxen_set_bits((cmd_desc)->flags_opcode, 7, 6, val)
|
||||
((cmd_desc)->flags_opcode &= ~cpu_to_le16(0x3f<<7), \
|
||||
(cmd_desc)->flags_opcode |= cpu_to_le16((val) & (0x3f<<7)))
|
||||
|
||||
#define netxen_set_cmd_desc_num_of_buff(cmd_desc, val) \
|
||||
_netxen_set_bits((cmd_desc)->num_of_buffers_total_length, 0, 8, val);
|
||||
((cmd_desc)->num_of_buffers_total_length &= ~cpu_to_le32(0xff), \
|
||||
(cmd_desc)->num_of_buffers_total_length |= cpu_to_le32((val) & 0xff))
|
||||
#define netxen_set_cmd_desc_totallength(cmd_desc, val) \
|
||||
_netxen_set_bits((cmd_desc)->num_of_buffers_total_length, 8, 24, val);
|
||||
((cmd_desc)->num_of_buffers_total_length &= cpu_to_le32(0xff), \
|
||||
(cmd_desc)->num_of_buffers_total_length |= cpu_to_le32(val << 24))
|
||||
|
||||
#define netxen_get_cmd_desc_opcode(cmd_desc) \
|
||||
(((cmd_desc)->flags_opcode >> 7) & 0x003F)
|
||||
((le16_to_cpu((cmd_desc)->flags_opcode) >> 7) & 0x003F)
|
||||
#define netxen_get_cmd_desc_totallength(cmd_desc) \
|
||||
(((cmd_desc)->num_of_buffers_total_length >> 8) & 0x0FFFFFF)
|
||||
(le32_to_cpu((cmd_desc)->num_of_buffers_total_length) >> 8)
|
||||
|
||||
struct cmd_desc_type0 {
|
||||
u8 tcp_hdr_offset; /* For LSO only */
|
||||
u8 ip_hdr_offset; /* For LSO only */
|
||||
/* Bit pattern: 0-6 flags, 7-12 opcode, 13-15 unused */
|
||||
u16 flags_opcode;
|
||||
__le16 flags_opcode;
|
||||
/* Bit pattern: 0-7 total number of segments,
|
||||
8-31 Total size of the packet */
|
||||
u32 num_of_buffers_total_length;
|
||||
__le32 num_of_buffers_total_length;
|
||||
union {
|
||||
struct {
|
||||
u32 addr_low_part2;
|
||||
u32 addr_high_part2;
|
||||
__le32 addr_low_part2;
|
||||
__le32 addr_high_part2;
|
||||
};
|
||||
u64 addr_buffer2;
|
||||
__le64 addr_buffer2;
|
||||
};
|
||||
|
||||
u16 reference_handle; /* changed to u16 to add mss */
|
||||
u16 mss; /* passed by NDIS_PACKET for LSO */
|
||||
__le16 reference_handle; /* changed to u16 to add mss */
|
||||
__le16 mss; /* passed by NDIS_PACKET for LSO */
|
||||
/* Bit pattern 0-3 port, 0-3 ctx id */
|
||||
u8 port_ctxid;
|
||||
u8 total_hdr_length; /* LSO only : MAC+IP+TCP Hdr size */
|
||||
u16 conn_id; /* IPSec offoad only */
|
||||
__le16 conn_id; /* IPSec offoad only */
|
||||
|
||||
union {
|
||||
struct {
|
||||
u32 addr_low_part3;
|
||||
u32 addr_high_part3;
|
||||
__le32 addr_low_part3;
|
||||
__le32 addr_high_part3;
|
||||
};
|
||||
u64 addr_buffer3;
|
||||
__le64 addr_buffer3;
|
||||
};
|
||||
union {
|
||||
struct {
|
||||
u32 addr_low_part1;
|
||||
u32 addr_high_part1;
|
||||
__le32 addr_low_part1;
|
||||
__le32 addr_high_part1;
|
||||
};
|
||||
u64 addr_buffer1;
|
||||
__le64 addr_buffer1;
|
||||
};
|
||||
|
||||
u16 buffer1_length;
|
||||
u16 buffer2_length;
|
||||
u16 buffer3_length;
|
||||
u16 buffer4_length;
|
||||
__le16 buffer1_length;
|
||||
__le16 buffer2_length;
|
||||
__le16 buffer3_length;
|
||||
__le16 buffer4_length;
|
||||
|
||||
union {
|
||||
struct {
|
||||
u32 addr_low_part4;
|
||||
u32 addr_high_part4;
|
||||
__le32 addr_low_part4;
|
||||
__le32 addr_high_part4;
|
||||
};
|
||||
u64 addr_buffer4;
|
||||
__le64 addr_buffer4;
|
||||
};
|
||||
|
||||
u64 unused;
|
||||
__le64 unused;
|
||||
|
||||
} __attribute__ ((aligned(64)));
|
||||
|
||||
/* Note: sizeof(rcv_desc) should always be a mutliple of 2 */
|
||||
struct rcv_desc {
|
||||
u16 reference_handle;
|
||||
u16 reserved;
|
||||
u32 buffer_length; /* allocated buffer length (usually 2K) */
|
||||
u64 addr_buffer;
|
||||
__le16 reference_handle;
|
||||
__le16 reserved;
|
||||
__le32 buffer_length; /* allocated buffer length (usually 2K) */
|
||||
__le64 addr_buffer;
|
||||
};
|
||||
|
||||
/* opcode field in status_desc */
|
||||
@@ -405,36 +399,36 @@ struct rcv_desc {
|
||||
(((status_desc)->lro & 0x80) >> 7)
|
||||
|
||||
#define netxen_get_sts_port(status_desc) \
|
||||
((status_desc)->status_desc_data & 0x0F)
|
||||
(le64_to_cpu((status_desc)->status_desc_data) & 0x0F)
|
||||
#define netxen_get_sts_status(status_desc) \
|
||||
(((status_desc)->status_desc_data >> 4) & 0x0F)
|
||||
((le64_to_cpu((status_desc)->status_desc_data) >> 4) & 0x0F)
|
||||
#define netxen_get_sts_type(status_desc) \
|
||||
(((status_desc)->status_desc_data >> 8) & 0x0F)
|
||||
((le64_to_cpu((status_desc)->status_desc_data) >> 8) & 0x0F)
|
||||
#define netxen_get_sts_totallength(status_desc) \
|
||||
(((status_desc)->status_desc_data >> 12) & 0xFFFF)
|
||||
((le64_to_cpu((status_desc)->status_desc_data) >> 12) & 0xFFFF)
|
||||
#define netxen_get_sts_refhandle(status_desc) \
|
||||
(((status_desc)->status_desc_data >> 28) & 0xFFFF)
|
||||
((le64_to_cpu((status_desc)->status_desc_data) >> 28) & 0xFFFF)
|
||||
#define netxen_get_sts_prot(status_desc) \
|
||||
(((status_desc)->status_desc_data >> 44) & 0x0F)
|
||||
((le64_to_cpu((status_desc)->status_desc_data) >> 44) & 0x0F)
|
||||
#define netxen_get_sts_owner(status_desc) \
|
||||
(((status_desc)->status_desc_data >> 56) & 0x03)
|
||||
((le64_to_cpu((status_desc)->status_desc_data) >> 56) & 0x03)
|
||||
#define netxen_get_sts_opcode(status_desc) \
|
||||
(((status_desc)->status_desc_data >> 58) & 0x03F)
|
||||
((le64_to_cpu((status_desc)->status_desc_data) >> 58) & 0x03F)
|
||||
|
||||
#define netxen_clear_sts_owner(status_desc) \
|
||||
((status_desc)->status_desc_data &= \
|
||||
~(((unsigned long long)3) << 56 ))
|
||||
~cpu_to_le64(((unsigned long long)3) << 56 ))
|
||||
#define netxen_set_sts_owner(status_desc, val) \
|
||||
((status_desc)->status_desc_data |= \
|
||||
(((unsigned long long)((val) & 0x3)) << 56 ))
|
||||
cpu_to_le64(((unsigned long long)((val) & 0x3)) << 56 ))
|
||||
|
||||
struct status_desc {
|
||||
/* Bit pattern: 0-3 port, 4-7 status, 8-11 type, 12-27 total_length
|
||||
28-43 reference_handle, 44-47 protocol, 48-52 unused
|
||||
53-55 desc_cnt, 56-57 owner, 58-63 opcode
|
||||
*/
|
||||
u64 status_desc_data;
|
||||
u32 hash_value;
|
||||
__le64 status_desc_data;
|
||||
__le32 hash_value;
|
||||
u8 hash_type;
|
||||
u8 msg_type;
|
||||
u8 unused;
|
||||
@@ -1005,9 +999,9 @@ void netxen_niu_gbe_set_mii_mode(struct netxen_adapter *adapter, int port,
|
||||
void netxen_niu_gbe_set_gmii_mode(struct netxen_adapter *adapter, int port,
|
||||
long enable);
|
||||
int netxen_niu_gbe_phy_read(struct netxen_adapter *adapter, long phy, long reg,
|
||||
__le32 * readval);
|
||||
__u32 * readval);
|
||||
int netxen_niu_gbe_phy_write(struct netxen_adapter *adapter, long phy,
|
||||
long reg, __le32 val);
|
||||
long reg, __u32 val);
|
||||
|
||||
/* Functions available from netxen_nic_hw.c */
|
||||
int netxen_nic_set_mtu_xgb(struct netxen_port *port, int new_mtu);
|
||||
|
||||
@@ -218,7 +218,7 @@ netxen_nic_set_settings(struct net_device *dev, struct ethtool_cmd *ecmd)
|
||||
{
|
||||
struct netxen_port *port = netdev_priv(dev);
|
||||
struct netxen_adapter *adapter = port->adapter;
|
||||
__le32 status;
|
||||
__u32 status;
|
||||
|
||||
/* read which mode */
|
||||
if (adapter->ahw.board_type == NETXEN_NIC_GBE) {
|
||||
@@ -226,7 +226,7 @@ netxen_nic_set_settings(struct net_device *dev, struct ethtool_cmd *ecmd)
|
||||
if (adapter->phy_write
|
||||
&& adapter->phy_write(adapter, port->portnum,
|
||||
NETXEN_NIU_GB_MII_MGMT_ADDR_AUTONEG,
|
||||
(__le32) ecmd->autoneg) != 0)
|
||||
ecmd->autoneg) != 0)
|
||||
return -EIO;
|
||||
else
|
||||
port->link_autoneg = ecmd->autoneg;
|
||||
@@ -279,7 +279,7 @@ static int netxen_nic_get_regs_len(struct net_device *dev)
|
||||
}
|
||||
|
||||
struct netxen_niu_regs {
|
||||
__le32 reg[NETXEN_NIC_REGS_COUNT];
|
||||
__u32 reg[NETXEN_NIC_REGS_COUNT];
|
||||
};
|
||||
|
||||
static struct netxen_niu_regs niu_registers[] = {
|
||||
@@ -372,7 +372,7 @@ netxen_nic_get_regs(struct net_device *dev, struct ethtool_regs *regs, void *p)
|
||||
{
|
||||
struct netxen_port *port = netdev_priv(dev);
|
||||
struct netxen_adapter *adapter = port->adapter;
|
||||
__le32 mode, *regs_buff = p;
|
||||
__u32 mode, *regs_buff = p;
|
||||
void __iomem *addr;
|
||||
int i, window;
|
||||
|
||||
@@ -415,7 +415,7 @@ static u32 netxen_nic_get_link(struct net_device *dev)
|
||||
{
|
||||
struct netxen_port *port = netdev_priv(dev);
|
||||
struct netxen_adapter *adapter = port->adapter;
|
||||
__le32 status;
|
||||
__u32 status;
|
||||
|
||||
/* read which mode */
|
||||
if (adapter->ahw.board_type == NETXEN_NIC_GBE) {
|
||||
@@ -482,13 +482,13 @@ netxen_nic_get_pauseparam(struct net_device *dev,
|
||||
{
|
||||
struct netxen_port *port = netdev_priv(dev);
|
||||
struct netxen_adapter *adapter = port->adapter;
|
||||
__le32 val;
|
||||
__u32 val;
|
||||
|
||||
if (adapter->ahw.board_type == NETXEN_NIC_GBE) {
|
||||
/* get flow control settings */
|
||||
netxen_nic_read_w0(adapter,
|
||||
NETXEN_NIU_GB_MAC_CONFIG_0(port->portnum),
|
||||
(u32 *) & val);
|
||||
&val);
|
||||
pause->rx_pause = netxen_gb_get_rx_flowctl(val);
|
||||
pause->tx_pause = netxen_gb_get_tx_flowctl(val);
|
||||
/* get autoneg settings */
|
||||
@@ -502,7 +502,7 @@ netxen_nic_set_pauseparam(struct net_device *dev,
|
||||
{
|
||||
struct netxen_port *port = netdev_priv(dev);
|
||||
struct netxen_adapter *adapter = port->adapter;
|
||||
__le32 val;
|
||||
__u32 val;
|
||||
unsigned int autoneg;
|
||||
|
||||
/* read mode */
|
||||
@@ -522,13 +522,13 @@ netxen_nic_set_pauseparam(struct net_device *dev,
|
||||
|
||||
netxen_nic_write_w0(adapter,
|
||||
NETXEN_NIU_GB_MAC_CONFIG_0(port->portnum),
|
||||
*(u32 *) (&val));
|
||||
*&val);
|
||||
/* set autoneg */
|
||||
autoneg = pause->autoneg;
|
||||
if (adapter->phy_write
|
||||
&& adapter->phy_write(adapter, port->portnum,
|
||||
NETXEN_NIU_GB_MII_MGMT_ADDR_AUTONEG,
|
||||
(__le32) autoneg) != 0)
|
||||
autoneg) != 0)
|
||||
return -EIO;
|
||||
else {
|
||||
port->link_autoneg = pause->autoneg;
|
||||
@@ -543,7 +543,7 @@ static int netxen_nic_reg_test(struct net_device *dev)
|
||||
struct netxen_port *port = netdev_priv(dev);
|
||||
struct netxen_adapter *adapter = port->adapter;
|
||||
u32 data_read, data_written, save;
|
||||
__le32 mode;
|
||||
__u32 mode;
|
||||
|
||||
/*
|
||||
* first test the "Read Only" registers by writing which mode
|
||||
|
||||
@@ -95,7 +95,7 @@ void netxen_nic_set_multi(struct net_device *netdev)
|
||||
struct netxen_port *port = netdev_priv(netdev);
|
||||
struct netxen_adapter *adapter = port->adapter;
|
||||
struct dev_mc_list *mc_ptr;
|
||||
__le32 netxen_mac_addr_cntl_data = 0;
|
||||
__u32 netxen_mac_addr_cntl_data = 0;
|
||||
|
||||
mc_ptr = netdev->mc_list;
|
||||
if (netdev->flags & IFF_PROMISC) {
|
||||
@@ -236,8 +236,9 @@ int netxen_nic_hw_resources(struct netxen_adapter *adapter)
|
||||
}
|
||||
memset(addr, 0, sizeof(struct netxen_ring_ctx));
|
||||
adapter->ctx_desc = (struct netxen_ring_ctx *)addr;
|
||||
adapter->ctx_desc->cmd_consumer_offset = adapter->ctx_desc_phys_addr
|
||||
+ sizeof(struct netxen_ring_ctx);
|
||||
adapter->ctx_desc->cmd_consumer_offset =
|
||||
cpu_to_le64(adapter->ctx_desc_phys_addr +
|
||||
sizeof(struct netxen_ring_ctx));
|
||||
adapter->cmd_consumer = (uint32_t *) (((char *)addr) +
|
||||
sizeof(struct netxen_ring_ctx));
|
||||
|
||||
@@ -253,11 +254,10 @@ int netxen_nic_hw_resources(struct netxen_adapter *adapter)
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
adapter->ctx_desc->cmd_ring_addr_lo =
|
||||
hw->cmd_desc_phys_addr & 0xffffffffUL;
|
||||
adapter->ctx_desc->cmd_ring_addr_hi =
|
||||
((u64) hw->cmd_desc_phys_addr >> 32);
|
||||
adapter->ctx_desc->cmd_ring_size = adapter->max_tx_desc_count;
|
||||
adapter->ctx_desc->cmd_ring_addr =
|
||||
cpu_to_le64(hw->cmd_desc_phys_addr);
|
||||
adapter->ctx_desc->cmd_ring_size =
|
||||
cpu_to_le32(adapter->max_tx_desc_count);
|
||||
|
||||
hw->cmd_desc_head = (struct cmd_desc_type0 *)addr;
|
||||
|
||||
@@ -278,12 +278,10 @@ int netxen_nic_hw_resources(struct netxen_adapter *adapter)
|
||||
return err;
|
||||
}
|
||||
rcv_desc->desc_head = (struct rcv_desc *)addr;
|
||||
adapter->ctx_desc->rcv_ctx[ring].rcv_ring_addr_lo =
|
||||
rcv_desc->phys_addr & 0xffffffffUL;
|
||||
adapter->ctx_desc->rcv_ctx[ring].rcv_ring_addr_hi =
|
||||
((u64) rcv_desc->phys_addr >> 32);
|
||||
adapter->ctx_desc->rcv_ctx[ring].rcv_ring_addr =
|
||||
cpu_to_le64(rcv_desc->phys_addr);
|
||||
adapter->ctx_desc->rcv_ctx[ring].rcv_ring_size =
|
||||
rcv_desc->max_rx_desc_count;
|
||||
cpu_to_le32(rcv_desc->max_rx_desc_count);
|
||||
}
|
||||
|
||||
addr = netxen_alloc(adapter->ahw.pdev, STATUS_DESC_RINGSIZE,
|
||||
@@ -297,11 +295,10 @@ int netxen_nic_hw_resources(struct netxen_adapter *adapter)
|
||||
return err;
|
||||
}
|
||||
recv_ctx->rcv_status_desc_head = (struct status_desc *)addr;
|
||||
adapter->ctx_desc->sts_ring_addr_lo =
|
||||
recv_ctx->rcv_status_desc_phys_addr & 0xffffffffUL;
|
||||
adapter->ctx_desc->sts_ring_addr_hi =
|
||||
((u64) recv_ctx->rcv_status_desc_phys_addr >> 32);
|
||||
adapter->ctx_desc->sts_ring_size = adapter->max_rx_desc_count;
|
||||
adapter->ctx_desc->sts_ring_addr =
|
||||
cpu_to_le64(recv_ctx->rcv_status_desc_phys_addr);
|
||||
adapter->ctx_desc->sts_ring_size =
|
||||
cpu_to_le32(adapter->max_rx_desc_count);
|
||||
|
||||
}
|
||||
/* Window = 1 */
|
||||
@@ -387,10 +384,6 @@ void netxen_tso_check(struct netxen_adapter *adapter,
|
||||
}
|
||||
adapter->stats.xmitcsummed++;
|
||||
desc->tcp_hdr_offset = skb->h.raw - skb->data;
|
||||
netxen_set_cmd_desc_totallength(desc,
|
||||
cpu_to_le32
|
||||
(netxen_get_cmd_desc_totallength
|
||||
(desc)));
|
||||
desc->ip_hdr_offset = skb->nh.raw - skb->data;
|
||||
}
|
||||
|
||||
@@ -867,9 +860,9 @@ netxen_crb_writelit_adapter(struct netxen_adapter *adapter, unsigned long off,
|
||||
void netxen_nic_set_link_parameters(struct netxen_port *port)
|
||||
{
|
||||
struct netxen_adapter *adapter = port->adapter;
|
||||
__le32 status;
|
||||
__le32 autoneg;
|
||||
__le32 mode;
|
||||
__u32 status;
|
||||
__u32 autoneg;
|
||||
__u32 mode;
|
||||
|
||||
netxen_nic_read_w0(adapter, NETXEN_NIU_MODE, &mode);
|
||||
if (netxen_get_niu_enable_ge(mode)) { /* Gb 10/100/1000 Mbps mode */
|
||||
|
||||
@@ -124,28 +124,28 @@ typedef enum {
|
||||
*/
|
||||
|
||||
#define netxen_gb_enable_tx(config_word) \
|
||||
set_bit(0, (unsigned long*)(&config_word))
|
||||
((config_word) |= 1 << 0)
|
||||
#define netxen_gb_enable_rx(config_word) \
|
||||
set_bit(2, (unsigned long*)(&config_word))
|
||||
((config_word) |= 1 << 2)
|
||||
#define netxen_gb_tx_flowctl(config_word) \
|
||||
set_bit(4, (unsigned long*)(&config_word))
|
||||
((config_word) |= 1 << 4)
|
||||
#define netxen_gb_rx_flowctl(config_word) \
|
||||
set_bit(5, (unsigned long*)(&config_word))
|
||||
((config_word) |= 1 << 5)
|
||||
#define netxen_gb_tx_reset_pb(config_word) \
|
||||
set_bit(16, (unsigned long*)(&config_word))
|
||||
((config_word) |= 1 << 16)
|
||||
#define netxen_gb_rx_reset_pb(config_word) \
|
||||
set_bit(17, (unsigned long*)(&config_word))
|
||||
((config_word) |= 1 << 17)
|
||||
#define netxen_gb_tx_reset_mac(config_word) \
|
||||
set_bit(18, (unsigned long*)(&config_word))
|
||||
((config_word) |= 1 << 18)
|
||||
#define netxen_gb_rx_reset_mac(config_word) \
|
||||
set_bit(19, (unsigned long*)(&config_word))
|
||||
((config_word) |= 1 << 19)
|
||||
#define netxen_gb_soft_reset(config_word) \
|
||||
set_bit(31, (unsigned long*)(&config_word))
|
||||
((config_word) |= 1 << 31)
|
||||
|
||||
#define netxen_gb_unset_tx_flowctl(config_word) \
|
||||
clear_bit(4, (unsigned long *)(&config_word))
|
||||
((config_word) &= ~(1 << 4))
|
||||
#define netxen_gb_unset_rx_flowctl(config_word) \
|
||||
clear_bit(5, (unsigned long*)(&config_word))
|
||||
((config_word) &= ~(1 << 5))
|
||||
|
||||
#define netxen_gb_get_tx_synced(config_word) \
|
||||
_netxen_crb_get_bit((config_word), 1)
|
||||
@@ -171,15 +171,15 @@ typedef enum {
|
||||
*/
|
||||
|
||||
#define netxen_gb_set_duplex(config_word) \
|
||||
set_bit(0, (unsigned long*)&config_word)
|
||||
((config_word) |= 1 << 0)
|
||||
#define netxen_gb_set_crc_enable(config_word) \
|
||||
set_bit(1, (unsigned long*)&config_word)
|
||||
((config_word) |= 1 << 1)
|
||||
#define netxen_gb_set_padshort(config_word) \
|
||||
set_bit(2, (unsigned long*)&config_word)
|
||||
((config_word) |= 1 << 2)
|
||||
#define netxen_gb_set_checklength(config_word) \
|
||||
set_bit(4, (unsigned long*)&config_word)
|
||||
((config_word) |= 1 << 4)
|
||||
#define netxen_gb_set_hugeframes(config_word) \
|
||||
set_bit(5, (unsigned long*)&config_word)
|
||||
((config_word) |= 1 << 5)
|
||||
#define netxen_gb_set_preamblelen(config_word, val) \
|
||||
((config_word) |= ((val) << 12) & 0xF000)
|
||||
#define netxen_gb_set_intfmode(config_word, val) \
|
||||
@@ -190,9 +190,9 @@ typedef enum {
|
||||
#define netxen_gb_set_mii_mgmt_clockselect(config_word, val) \
|
||||
((config_word) |= ((val) & 0x07))
|
||||
#define netxen_gb_mii_mgmt_reset(config_word) \
|
||||
set_bit(31, (unsigned long*)&config_word)
|
||||
((config_word) |= 1 << 31)
|
||||
#define netxen_gb_mii_mgmt_unset(config_word) \
|
||||
clear_bit(31, (unsigned long*)&config_word)
|
||||
((config_word) &= ~(1 << 31))
|
||||
|
||||
/*
|
||||
* NIU GB MII Mgmt Command Register (applies to GB0, GB1, GB2, GB3)
|
||||
@@ -201,7 +201,7 @@ typedef enum {
|
||||
*/
|
||||
|
||||
#define netxen_gb_mii_mgmt_set_read_cycle(config_word) \
|
||||
set_bit(0, (unsigned long*)&config_word)
|
||||
((config_word) |= 1 << 0)
|
||||
#define netxen_gb_mii_mgmt_reg_addr(config_word, val) \
|
||||
((config_word) |= ((val) & 0x1F))
|
||||
#define netxen_gb_mii_mgmt_phy_addr(config_word, val) \
|
||||
@@ -274,9 +274,9 @@ typedef enum {
|
||||
#define netxen_set_phy_speed(config_word, val) \
|
||||
((config_word) |= ((val & 0x03) << 14))
|
||||
#define netxen_set_phy_duplex(config_word) \
|
||||
set_bit(13, (unsigned long*)&config_word)
|
||||
((config_word) |= 1 << 13)
|
||||
#define netxen_clear_phy_duplex(config_word) \
|
||||
clear_bit(13, (unsigned long*)&config_word)
|
||||
((config_word) &= ~(1 << 13))
|
||||
|
||||
#define netxen_get_phy_jabber(config_word) \
|
||||
_netxen_crb_get_bit(config_word, 0)
|
||||
@@ -350,11 +350,11 @@ typedef enum {
|
||||
_netxen_crb_get_bit(config_word, 15)
|
||||
|
||||
#define netxen_set_phy_int_link_status_changed(config_word) \
|
||||
set_bit(10, (unsigned long*)&config_word)
|
||||
((config_word) |= 1 << 10)
|
||||
#define netxen_set_phy_int_autoneg_completed(config_word) \
|
||||
set_bit(11, (unsigned long*)&config_word)
|
||||
((config_word) |= 1 << 11)
|
||||
#define netxen_set_phy_int_speed_changed(config_word) \
|
||||
set_bit(14, (unsigned long*)&config_word)
|
||||
((config_word) |= 1 << 14)
|
||||
|
||||
/*
|
||||
* NIU Mode Register.
|
||||
@@ -382,22 +382,22 @@ typedef enum {
|
||||
*/
|
||||
|
||||
#define netxen_set_gb_drop_gb0(config_word) \
|
||||
set_bit(0, (unsigned long*)&config_word)
|
||||
((config_word) |= 1 << 0)
|
||||
#define netxen_set_gb_drop_gb1(config_word) \
|
||||
set_bit(1, (unsigned long*)&config_word)
|
||||
((config_word) |= 1 << 1)
|
||||
#define netxen_set_gb_drop_gb2(config_word) \
|
||||
set_bit(2, (unsigned long*)&config_word)
|
||||
((config_word) |= 1 << 2)
|
||||
#define netxen_set_gb_drop_gb3(config_word) \
|
||||
set_bit(3, (unsigned long*)&config_word)
|
||||
((config_word) |= 1 << 3)
|
||||
|
||||
#define netxen_clear_gb_drop_gb0(config_word) \
|
||||
clear_bit(0, (unsigned long*)&config_word)
|
||||
((config_word) &= ~(1 << 0))
|
||||
#define netxen_clear_gb_drop_gb1(config_word) \
|
||||
clear_bit(1, (unsigned long*)&config_word)
|
||||
((config_word) &= ~(1 << 1))
|
||||
#define netxen_clear_gb_drop_gb2(config_word) \
|
||||
clear_bit(2, (unsigned long*)&config_word)
|
||||
((config_word) &= ~(1 << 2))
|
||||
#define netxen_clear_gb_drop_gb3(config_word) \
|
||||
clear_bit(3, (unsigned long*)&config_word)
|
||||
((config_word) &= ~(1 << 3))
|
||||
|
||||
/*
|
||||
* NIU XG MAC Config Register
|
||||
@@ -413,7 +413,7 @@ typedef enum {
|
||||
*/
|
||||
|
||||
#define netxen_xg_soft_reset(config_word) \
|
||||
set_bit(4, (unsigned long*)&config_word)
|
||||
((config_word) |= 1 << 4)
|
||||
|
||||
/*
|
||||
* MAC Control Register
|
||||
@@ -433,19 +433,19 @@ typedef enum {
|
||||
#define netxen_nic_mcr_set_id_pool0(config, val) \
|
||||
((config) |= ((val) &0x03))
|
||||
#define netxen_nic_mcr_set_enable_xtnd0(config) \
|
||||
(set_bit(3, (unsigned long *)&(config)))
|
||||
((config) |= 1 << 3)
|
||||
#define netxen_nic_mcr_set_id_pool1(config, val) \
|
||||
((config) |= (((val) & 0x03) << 4))
|
||||
#define netxen_nic_mcr_set_enable_xtnd1(config) \
|
||||
(set_bit(6, (unsigned long *)&(config)))
|
||||
((config) |= 1 << 6)
|
||||
#define netxen_nic_mcr_set_id_pool2(config, val) \
|
||||
((config) |= (((val) & 0x03) << 8))
|
||||
#define netxen_nic_mcr_set_enable_xtnd2(config) \
|
||||
(set_bit(10, (unsigned long *)&(config)))
|
||||
((config) |= 1 << 10)
|
||||
#define netxen_nic_mcr_set_id_pool3(config, val) \
|
||||
((config) |= (((val) & 0x03) << 12))
|
||||
#define netxen_nic_mcr_set_enable_xtnd3(config) \
|
||||
(set_bit(14, (unsigned long *)&(config)))
|
||||
((config) |= 1 << 14)
|
||||
#define netxen_nic_mcr_set_mode_select(config, val) \
|
||||
((config) |= (((val) & 0x03) << 24))
|
||||
#define netxen_nic_mcr_set_enable_pool(config, val) \
|
||||
|
||||
@@ -690,8 +690,7 @@ int netxen_nic_rx_has_work(struct netxen_adapter *adapter)
|
||||
desc_head = recv_ctx->rcv_status_desc_head;
|
||||
desc = &desc_head[consumer];
|
||||
|
||||
if (((le16_to_cpu(netxen_get_sts_owner(desc)))
|
||||
& STATUS_OWNER_HOST))
|
||||
if (netxen_get_sts_owner(desc) & STATUS_OWNER_HOST)
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -787,11 +786,11 @@ netxen_process_rcv(struct netxen_adapter *adapter, int ctxid,
|
||||
struct netxen_port *port = adapter->port[netxen_get_sts_port(desc)];
|
||||
struct pci_dev *pdev = port->pdev;
|
||||
struct net_device *netdev = port->netdev;
|
||||
int index = le16_to_cpu(netxen_get_sts_refhandle(desc));
|
||||
int index = netxen_get_sts_refhandle(desc);
|
||||
struct netxen_recv_context *recv_ctx = &(adapter->recv_ctx[ctxid]);
|
||||
struct netxen_rx_buffer *buffer;
|
||||
struct sk_buff *skb;
|
||||
u32 length = le16_to_cpu(netxen_get_sts_totallength(desc));
|
||||
u32 length = netxen_get_sts_totallength(desc);
|
||||
u32 desc_ctx;
|
||||
struct netxen_rcv_desc_ctx *rcv_desc;
|
||||
int ret;
|
||||
@@ -918,16 +917,14 @@ u32 netxen_process_rcv_ring(struct netxen_adapter *adapter, int ctxid, int max)
|
||||
*/
|
||||
while (count < max) {
|
||||
desc = &desc_head[consumer];
|
||||
if (!
|
||||
(le16_to_cpu(netxen_get_sts_owner(desc)) &
|
||||
STATUS_OWNER_HOST)) {
|
||||
if (!(netxen_get_sts_owner(desc) & STATUS_OWNER_HOST)) {
|
||||
DPRINTK(ERR, "desc %p ownedby %x\n", desc,
|
||||
netxen_get_sts_owner(desc));
|
||||
break;
|
||||
}
|
||||
netxen_process_rcv(adapter, ctxid, desc);
|
||||
netxen_clear_sts_owner(desc);
|
||||
netxen_set_sts_owner(desc, cpu_to_le16(STATUS_OWNER_PHANTOM));
|
||||
netxen_set_sts_owner(desc, STATUS_OWNER_PHANTOM);
|
||||
consumer = (consumer + 1) & (adapter->max_rx_desc_count - 1);
|
||||
count++;
|
||||
}
|
||||
@@ -1232,7 +1229,7 @@ void netxen_post_rx_buffers_nodb(struct netxen_adapter *adapter, uint32_t ctx,
|
||||
|
||||
/* make a rcv descriptor */
|
||||
pdesc->reference_handle = cpu_to_le16(buffer->ref_handle);
|
||||
pdesc->buffer_length = cpu_to_le16(rcv_desc->dma_size);
|
||||
pdesc->buffer_length = cpu_to_le32(rcv_desc->dma_size);
|
||||
pdesc->addr_buffer = cpu_to_le64(buffer->dma);
|
||||
DPRINTK(INFO, "done writing descripter\n");
|
||||
producer =
|
||||
|
||||
@@ -79,7 +79,7 @@ void netxen_indicate_link_status(struct netxen_adapter *adapter, u32 portno,
|
||||
void netxen_handle_port_int(struct netxen_adapter *adapter, u32 portno,
|
||||
u32 enable)
|
||||
{
|
||||
__le32 int_src;
|
||||
__u32 int_src;
|
||||
struct netxen_port *port;
|
||||
|
||||
/* This should clear the interrupt source */
|
||||
@@ -110,7 +110,7 @@ void netxen_handle_port_int(struct netxen_adapter *adapter, u32 portno,
|
||||
/* write it down later.. */
|
||||
if ((netxen_get_phy_int_speed_changed(int_src))
|
||||
|| (netxen_get_phy_int_link_status_changed(int_src))) {
|
||||
__le32 status;
|
||||
__u32 status;
|
||||
|
||||
DPRINTK(INFO, "SPEED CHANGED OR LINK STATUS CHANGED \n");
|
||||
|
||||
|
||||
@@ -117,7 +117,7 @@ netxen_nic_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
|
||||
void __iomem *mem_ptr1 = NULL;
|
||||
void __iomem *mem_ptr2 = NULL;
|
||||
|
||||
u8 *db_ptr = NULL;
|
||||
u8 __iomem *db_ptr = NULL;
|
||||
unsigned long mem_base, mem_len, db_base, db_len;
|
||||
int pci_using_dac, i, err;
|
||||
int ring;
|
||||
@@ -191,7 +191,7 @@ netxen_nic_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
|
||||
db_len);
|
||||
|
||||
db_ptr = ioremap(db_base, NETXEN_DB_MAPSIZE_BYTES);
|
||||
if (db_ptr == 0UL) {
|
||||
if (!db_ptr) {
|
||||
printk(KERN_ERR "%s: Failed to allocate doorbell map.",
|
||||
netxen_nic_driver_name);
|
||||
err = -EIO;
|
||||
@@ -818,7 +818,7 @@ static int netxen_nic_xmit_frame(struct sk_buff *skb, struct net_device *netdev)
|
||||
/* Take skb->data itself */
|
||||
pbuf = &adapter->cmd_buf_arr[producer];
|
||||
if ((netdev->features & NETIF_F_TSO) && skb_shinfo(skb)->gso_size > 0) {
|
||||
pbuf->mss = cpu_to_le16(skb_shinfo(skb)->gso_size);
|
||||
pbuf->mss = skb_shinfo(skb)->gso_size;
|
||||
hwdesc->mss = cpu_to_le16(skb_shinfo(skb)->gso_size);
|
||||
} else {
|
||||
pbuf->mss = 0;
|
||||
@@ -882,7 +882,7 @@ static int netxen_nic_xmit_frame(struct sk_buff *skb, struct net_device *netdev)
|
||||
hwdesc->addr_buffer3 = cpu_to_le64(temp_dma);
|
||||
break;
|
||||
case 3:
|
||||
hwdesc->buffer4_length = temp_len;
|
||||
hwdesc->buffer4_length = cpu_to_le16(temp_len);
|
||||
hwdesc->addr_buffer4 = cpu_to_le64(temp_dma);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -89,15 +89,15 @@ static inline int phy_unlock(struct netxen_adapter *adapter)
|
||||
*
|
||||
*/
|
||||
int netxen_niu_gbe_phy_read(struct netxen_adapter *adapter, long phy,
|
||||
long reg, __le32 * readval)
|
||||
long reg, __u32 * readval)
|
||||
{
|
||||
long timeout = 0;
|
||||
long result = 0;
|
||||
long restore = 0;
|
||||
__le32 address;
|
||||
__le32 command;
|
||||
__le32 status;
|
||||
__le32 mac_cfg0;
|
||||
__u32 address;
|
||||
__u32 command;
|
||||
__u32 status;
|
||||
__u32 mac_cfg0;
|
||||
|
||||
if (phy_lock(adapter) != 0) {
|
||||
return -1;
|
||||
@@ -112,7 +112,7 @@ int netxen_niu_gbe_phy_read(struct netxen_adapter *adapter, long phy,
|
||||
&mac_cfg0, 4))
|
||||
return -EIO;
|
||||
if (netxen_gb_get_soft_reset(mac_cfg0)) {
|
||||
__le32 temp;
|
||||
__u32 temp;
|
||||
temp = 0;
|
||||
netxen_gb_tx_reset_pb(temp);
|
||||
netxen_gb_rx_reset_pb(temp);
|
||||
@@ -184,15 +184,15 @@ int netxen_niu_gbe_phy_read(struct netxen_adapter *adapter, long phy,
|
||||
*
|
||||
*/
|
||||
int netxen_niu_gbe_phy_write(struct netxen_adapter *adapter,
|
||||
long phy, long reg, __le32 val)
|
||||
long phy, long reg, __u32 val)
|
||||
{
|
||||
long timeout = 0;
|
||||
long result = 0;
|
||||
long restore = 0;
|
||||
__le32 address;
|
||||
__le32 command;
|
||||
__le32 status;
|
||||
__le32 mac_cfg0;
|
||||
__u32 address;
|
||||
__u32 command;
|
||||
__u32 status;
|
||||
__u32 mac_cfg0;
|
||||
|
||||
/*
|
||||
* MII mgmt all goes through port 0 MAC interface, so it
|
||||
@@ -203,7 +203,7 @@ int netxen_niu_gbe_phy_write(struct netxen_adapter *adapter,
|
||||
&mac_cfg0, 4))
|
||||
return -EIO;
|
||||
if (netxen_gb_get_soft_reset(mac_cfg0)) {
|
||||
__le32 temp;
|
||||
__u32 temp;
|
||||
temp = 0;
|
||||
netxen_gb_tx_reset_pb(temp);
|
||||
netxen_gb_rx_reset_pb(temp);
|
||||
@@ -269,7 +269,7 @@ int netxen_niu_gbe_enable_phy_interrupts(struct netxen_adapter *adapter,
|
||||
int port)
|
||||
{
|
||||
int result = 0;
|
||||
__le32 enable = 0;
|
||||
__u32 enable = 0;
|
||||
netxen_set_phy_int_link_status_changed(enable);
|
||||
netxen_set_phy_int_autoneg_completed(enable);
|
||||
netxen_set_phy_int_speed_changed(enable);
|
||||
@@ -402,7 +402,7 @@ void netxen_niu_gbe_set_gmii_mode(struct netxen_adapter *adapter,
|
||||
int netxen_niu_gbe_init_port(struct netxen_adapter *adapter, int port)
|
||||
{
|
||||
int result = 0;
|
||||
__le32 status;
|
||||
__u32 status;
|
||||
if (adapter->disable_phy_interrupts)
|
||||
adapter->disable_phy_interrupts(adapter, port);
|
||||
mdelay(2);
|
||||
@@ -410,7 +410,7 @@ int netxen_niu_gbe_init_port(struct netxen_adapter *adapter, int port)
|
||||
if (0 ==
|
||||
netxen_niu_gbe_phy_read(adapter, port,
|
||||
NETXEN_NIU_GB_MII_MGMT_ADDR_PHY_STATUS,
|
||||
(__le32 *) & status)) {
|
||||
&status)) {
|
||||
if (netxen_get_phy_link(status)) {
|
||||
if (netxen_get_phy_speed(status) == 2) {
|
||||
netxen_niu_gbe_set_gmii_mode(adapter, port, 1);
|
||||
@@ -489,7 +489,7 @@ int netxen_niu_gbe_handle_phy_interrupt(struct netxen_adapter *adapter,
|
||||
int port, long enable)
|
||||
{
|
||||
int result = 0;
|
||||
__le32 int_src;
|
||||
__u32 int_src;
|
||||
|
||||
printk(KERN_INFO PFX "NETXEN: Handling PHY interrupt on port %d"
|
||||
" (device enable = %d)\n", (int)port, (int)enable);
|
||||
@@ -530,7 +530,7 @@ int netxen_niu_gbe_handle_phy_interrupt(struct netxen_adapter *adapter,
|
||||
printk(KERN_INFO PFX "autoneg_error ");
|
||||
if ((netxen_get_phy_int_speed_changed(int_src))
|
||||
|| (netxen_get_phy_int_link_status_changed(int_src))) {
|
||||
__le32 status;
|
||||
__u32 status;
|
||||
|
||||
printk(KERN_INFO PFX
|
||||
"speed_changed or link status changed");
|
||||
@@ -583,9 +583,9 @@ int netxen_niu_gbe_handle_phy_interrupt(struct netxen_adapter *adapter,
|
||||
int netxen_niu_macaddr_get(struct netxen_adapter *adapter,
|
||||
int phy, netxen_ethernet_macaddr_t * addr)
|
||||
{
|
||||
u64 result = 0;
|
||||
__le32 stationhigh;
|
||||
__le32 stationlow;
|
||||
u32 stationhigh;
|
||||
u32 stationlow;
|
||||
u8 val[8];
|
||||
|
||||
if (addr == NULL)
|
||||
return -EINVAL;
|
||||
@@ -598,10 +598,10 @@ int netxen_niu_macaddr_get(struct netxen_adapter *adapter,
|
||||
if (netxen_nic_hw_read_wx(adapter, NETXEN_NIU_GB_STATION_ADDR_1(phy),
|
||||
&stationlow, 4))
|
||||
return -EIO;
|
||||
((__le32 *)val)[1] = cpu_to_le32(stationhigh);
|
||||
((__le32 *)val)[0] = cpu_to_le32(stationlow);
|
||||
|
||||
result = (u64) netxen_gb_get_stationaddress_low(stationlow);
|
||||
result |= (u64) stationhigh << 16;
|
||||
memcpy(*addr, &result, sizeof(netxen_ethernet_macaddr_t));
|
||||
memcpy(addr, val + 2, 6);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -613,24 +613,25 @@ int netxen_niu_macaddr_get(struct netxen_adapter *adapter,
|
||||
int netxen_niu_macaddr_set(struct netxen_port *port,
|
||||
netxen_ethernet_macaddr_t addr)
|
||||
{
|
||||
__le32 temp = 0;
|
||||
u8 temp[4];
|
||||
u32 val;
|
||||
struct netxen_adapter *adapter = port->adapter;
|
||||
int phy = port->portnum;
|
||||
unsigned char mac_addr[6];
|
||||
int i;
|
||||
|
||||
for (i = 0; i < 10; i++) {
|
||||
memcpy(&temp, addr, 2);
|
||||
temp <<= 16;
|
||||
temp[0] = temp[1] = 0;
|
||||
memcpy(temp + 2, addr, 2);
|
||||
val = le32_to_cpu(*(__le32 *)temp);
|
||||
if (netxen_nic_hw_write_wx
|
||||
(adapter, NETXEN_NIU_GB_STATION_ADDR_1(phy), &temp, 4))
|
||||
(adapter, NETXEN_NIU_GB_STATION_ADDR_1(phy), &val, 4))
|
||||
return -EIO;
|
||||
|
||||
temp = 0;
|
||||
|
||||
memcpy(&temp, ((u8 *) addr) + 2, sizeof(__le32));
|
||||
memcpy(temp, ((u8 *) addr) + 2, sizeof(__le32));
|
||||
val = le32_to_cpu(*(__le32 *)temp);
|
||||
if (netxen_nic_hw_write_wx
|
||||
(adapter, NETXEN_NIU_GB_STATION_ADDR_0(phy), &temp, 4))
|
||||
(adapter, NETXEN_NIU_GB_STATION_ADDR_0(phy), &val, 4))
|
||||
return -2;
|
||||
|
||||
netxen_niu_macaddr_get(adapter, phy,
|
||||
@@ -659,9 +660,9 @@ int netxen_niu_macaddr_set(struct netxen_port *port,
|
||||
int netxen_niu_enable_gbe_port(struct netxen_adapter *adapter,
|
||||
int port, netxen_niu_gbe_ifmode_t mode)
|
||||
{
|
||||
__le32 mac_cfg0;
|
||||
__le32 mac_cfg1;
|
||||
__le32 mii_cfg;
|
||||
__u32 mac_cfg0;
|
||||
__u32 mac_cfg1;
|
||||
__u32 mii_cfg;
|
||||
|
||||
if ((port < 0) || (port > NETXEN_NIU_MAX_GBE_PORTS))
|
||||
return -EINVAL;
|
||||
@@ -736,7 +737,7 @@ int netxen_niu_enable_gbe_port(struct netxen_adapter *adapter,
|
||||
/* Disable a GbE interface */
|
||||
int netxen_niu_disable_gbe_port(struct netxen_adapter *adapter, int port)
|
||||
{
|
||||
__le32 mac_cfg0;
|
||||
__u32 mac_cfg0;
|
||||
|
||||
if ((port < 0) || (port > NETXEN_NIU_MAX_GBE_PORTS))
|
||||
return -EINVAL;
|
||||
@@ -752,7 +753,7 @@ int netxen_niu_disable_gbe_port(struct netxen_adapter *adapter, int port)
|
||||
/* Disable an XG interface */
|
||||
int netxen_niu_disable_xg_port(struct netxen_adapter *adapter, int port)
|
||||
{
|
||||
__le32 mac_cfg;
|
||||
__u32 mac_cfg;
|
||||
|
||||
if (port != 0)
|
||||
return -EINVAL;
|
||||
@@ -769,7 +770,7 @@ int netxen_niu_disable_xg_port(struct netxen_adapter *adapter, int port)
|
||||
int netxen_niu_set_promiscuous_mode(struct netxen_adapter *adapter, int port,
|
||||
netxen_niu_prom_mode_t mode)
|
||||
{
|
||||
__le32 reg;
|
||||
__u32 reg;
|
||||
|
||||
if ((port < 0) || (port > NETXEN_NIU_MAX_GBE_PORTS))
|
||||
return -EINVAL;
|
||||
@@ -826,22 +827,21 @@ int netxen_niu_set_promiscuous_mode(struct netxen_adapter *adapter, int port,
|
||||
int netxen_niu_xg_macaddr_set(struct netxen_port *port,
|
||||
netxen_ethernet_macaddr_t addr)
|
||||
{
|
||||
__le32 temp = 0;
|
||||
u8 temp[4];
|
||||
u32 val;
|
||||
struct netxen_adapter *adapter = port->adapter;
|
||||
|
||||
memcpy(&temp, addr, 2);
|
||||
temp = cpu_to_le32(temp);
|
||||
temp <<= 16;
|
||||
temp[0] = temp[1] = 0;
|
||||
memcpy(temp + 2, addr, 2);
|
||||
val = le32_to_cpu(*(__le32 *)temp);
|
||||
if (netxen_nic_hw_write_wx(adapter, NETXEN_NIU_XGE_STATION_ADDR_0_1,
|
||||
&temp, 4))
|
||||
&val, 4))
|
||||
return -EIO;
|
||||
|
||||
temp = 0;
|
||||
|
||||
memcpy(&temp, ((u8 *) addr) + 2, sizeof(__le32));
|
||||
temp = cpu_to_le32(temp);
|
||||
val = le32_to_cpu(*(__le32 *)temp);
|
||||
if (netxen_nic_hw_write_wx(adapter, NETXEN_NIU_XGE_STATION_ADDR_0_HI,
|
||||
&temp, 4))
|
||||
&val, 4))
|
||||
return -EIO;
|
||||
|
||||
return 0;
|
||||
@@ -854,9 +854,9 @@ int netxen_niu_xg_macaddr_set(struct netxen_port *port,
|
||||
int netxen_niu_xg_macaddr_get(struct netxen_adapter *adapter, int phy,
|
||||
netxen_ethernet_macaddr_t * addr)
|
||||
{
|
||||
__le32 stationhigh;
|
||||
__le32 stationlow;
|
||||
u64 result;
|
||||
u32 stationhigh;
|
||||
u32 stationlow;
|
||||
u8 val[8];
|
||||
|
||||
if (addr == NULL)
|
||||
return -EINVAL;
|
||||
@@ -869,10 +869,10 @@ int netxen_niu_xg_macaddr_get(struct netxen_adapter *adapter, int phy,
|
||||
if (netxen_nic_hw_read_wx(adapter, NETXEN_NIU_XGE_STATION_ADDR_0_1,
|
||||
&stationlow, 4))
|
||||
return -EIO;
|
||||
((__le32 *)val)[1] = cpu_to_le32(stationhigh);
|
||||
((__le32 *)val)[0] = cpu_to_le32(stationlow);
|
||||
|
||||
result = ((u64) stationlow) >> 16;
|
||||
result |= (u64) stationhigh << 16;
|
||||
memcpy(*addr, &result, sizeof(netxen_ethernet_macaddr_t));
|
||||
memcpy(addr, val + 2, 6);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -880,7 +880,7 @@ int netxen_niu_xg_macaddr_get(struct netxen_adapter *adapter, int phy,
|
||||
int netxen_niu_xg_set_promiscuous_mode(struct netxen_adapter *adapter,
|
||||
int port, netxen_niu_prom_mode_t mode)
|
||||
{
|
||||
__le32 reg;
|
||||
__u32 reg;
|
||||
|
||||
if ((port < 0) || (port > NETXEN_NIU_MAX_GBE_PORTS))
|
||||
return -EINVAL;
|
||||
|
||||
@@ -968,11 +968,11 @@ static void smc911x_phy_configure(struct work_struct *work)
|
||||
* We should not be called if phy_type is zero.
|
||||
*/
|
||||
if (lp->phy_type == 0)
|
||||
goto smc911x_phy_configure_exit;
|
||||
goto smc911x_phy_configure_exit_nolock;
|
||||
|
||||
if (smc911x_phy_reset(dev, phyaddr)) {
|
||||
printk("%s: PHY reset timed out\n", dev->name);
|
||||
goto smc911x_phy_configure_exit;
|
||||
goto smc911x_phy_configure_exit_nolock;
|
||||
}
|
||||
spin_lock_irqsave(&lp->lock, flags);
|
||||
|
||||
@@ -1041,6 +1041,7 @@ static void smc911x_phy_configure(struct work_struct *work)
|
||||
|
||||
smc911x_phy_configure_exit:
|
||||
spin_unlock_irqrestore(&lp->lock, flags);
|
||||
smc911x_phy_configure_exit_nolock:
|
||||
lp->work_pending = 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -1925,6 +1925,8 @@ spider_net_stop(struct net_device *netdev)
|
||||
/* release chains */
|
||||
spider_net_release_tx_chain(card, 1);
|
||||
|
||||
spider_net_free_rx_chain_contents(card);
|
||||
|
||||
spider_net_free_chain(card, &card->tx_chain);
|
||||
spider_net_free_chain(card, &card->rx_chain);
|
||||
|
||||
|
||||
@@ -661,9 +661,11 @@ static void quirk_via_bridge(struct pci_dev *dev)
|
||||
/* See what bridge we have and find the device ranges */
|
||||
switch (dev->device) {
|
||||
case PCI_DEVICE_ID_VIA_82C686:
|
||||
/* 82C686 is special */
|
||||
via_vlink_dev_lo = 7;
|
||||
via_vlink_dev_hi = 7;
|
||||
/* The VT82C686 is special, it attaches to PCI and can have
|
||||
any device number. All its subdevices are functions of
|
||||
that single device. */
|
||||
via_vlink_dev_lo = PCI_SLOT(dev->devfn);
|
||||
via_vlink_dev_hi = PCI_SLOT(dev->devfn);
|
||||
break;
|
||||
case PCI_DEVICE_ID_VIA_8237:
|
||||
case PCI_DEVICE_ID_VIA_8237A:
|
||||
@@ -1260,8 +1262,8 @@ static void quirk_jmicron_dualfn(struct pci_dev *pdev)
|
||||
pci_read_config_dword(pdev, 0x40, &conf);
|
||||
/* Enable dual function mode, AHCI on fn 0, IDE fn1 */
|
||||
/* Set the class codes correctly and then direct IDE 0 */
|
||||
conf &= ~0x000F0200; /* Clear bit 9 and 16-19 */
|
||||
conf |= 0x00C20002; /* Set bit 1, 17, 22, 23 */
|
||||
conf &= ~0x000FF200; /* Clear bit 9 and 12-19 */
|
||||
conf |= 0x00C2A102; /* Set 1, 8, 13, 15, 17, 22, 23 */
|
||||
pci_write_config_dword(pdev, 0x40, conf);
|
||||
|
||||
/* Reconfigure so that the PCI scanner discovers the
|
||||
|
||||
@@ -200,11 +200,8 @@ static struct pci_dev * pci_find_subsys(unsigned int vendor,
|
||||
* can cause some machines to crash. So here we detect and flag that
|
||||
* situation and bail out early.
|
||||
*/
|
||||
if (unlikely(list_empty(&pci_devices))) {
|
||||
printk(KERN_INFO "pci_find_subsys() called while pci_devices "
|
||||
"is still empty\n");
|
||||
if (unlikely(list_empty(&pci_devices)))
|
||||
return NULL;
|
||||
}
|
||||
down_read(&pci_bus_sem);
|
||||
n = from ? from->global_list.next : pci_devices.next;
|
||||
|
||||
@@ -278,11 +275,8 @@ pci_get_subsys(unsigned int vendor, unsigned int device,
|
||||
* can cause some machines to crash. So here we detect and flag that
|
||||
* situation and bail out early.
|
||||
*/
|
||||
if (unlikely(list_empty(&pci_devices))) {
|
||||
printk(KERN_NOTICE "pci_get_subsys() called while pci_devices "
|
||||
"is still empty\n");
|
||||
if (unlikely(list_empty(&pci_devices)))
|
||||
return NULL;
|
||||
}
|
||||
down_read(&pci_bus_sem);
|
||||
n = from ? from->global_list.next : pci_devices.next;
|
||||
|
||||
|
||||
@@ -418,7 +418,6 @@ struct scsi_qla_host {
|
||||
* concurrently.
|
||||
*/
|
||||
struct mutex mbox_sem;
|
||||
wait_queue_head_t mailbox_wait_queue;
|
||||
|
||||
/* temporary mailbox status registers */
|
||||
volatile uint8_t mbox_status_count;
|
||||
|
||||
@@ -76,4 +76,5 @@ int qla4xxx_process_ddb_changed(struct scsi_qla_host * ha,
|
||||
extern int ql4xextended_error_logging;
|
||||
extern int ql4xdiscoverywait;
|
||||
extern int ql4xdontresethba;
|
||||
extern int ql4_mod_unload;
|
||||
#endif /* _QLA4x_GBL_H */
|
||||
|
||||
@@ -958,25 +958,25 @@ static int qla4xxx_start_firmware_from_flash(struct scsi_qla_host *ha)
|
||||
return status;
|
||||
}
|
||||
|
||||
int ql4xxx_lock_drvr_wait(struct scsi_qla_host *a)
|
||||
int ql4xxx_lock_drvr_wait(struct scsi_qla_host *ha)
|
||||
{
|
||||
#define QL4_LOCK_DRVR_WAIT 300
|
||||
#define QL4_LOCK_DRVR_SLEEP 100
|
||||
#define QL4_LOCK_DRVR_WAIT 30
|
||||
#define QL4_LOCK_DRVR_SLEEP 1
|
||||
|
||||
int drvr_wait = QL4_LOCK_DRVR_WAIT;
|
||||
while (drvr_wait) {
|
||||
if (ql4xxx_lock_drvr(a) == 0) {
|
||||
msleep(QL4_LOCK_DRVR_SLEEP);
|
||||
if (ql4xxx_lock_drvr(ha) == 0) {
|
||||
ssleep(QL4_LOCK_DRVR_SLEEP);
|
||||
if (drvr_wait) {
|
||||
DEBUG2(printk("scsi%ld: %s: Waiting for "
|
||||
"Global Init Semaphore...n",
|
||||
a->host_no,
|
||||
__func__));
|
||||
"Global Init Semaphore(%d)...n",
|
||||
ha->host_no,
|
||||
__func__, drvr_wait));
|
||||
}
|
||||
drvr_wait -= QL4_LOCK_DRVR_SLEEP;
|
||||
} else {
|
||||
DEBUG2(printk("scsi%ld: %s: Global Init Semaphore "
|
||||
"acquired.n", a->host_no, __func__));
|
||||
"acquired.n", ha->host_no, __func__));
|
||||
return QLA_SUCCESS;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -433,7 +433,6 @@ static void qla4xxx_isr_decode_mailbox(struct scsi_qla_host * ha,
|
||||
readl(&ha->reg->mailbox[i]);
|
||||
|
||||
set_bit(AF_MBOX_COMMAND_DONE, &ha->flags);
|
||||
wake_up(&ha->mailbox_wait_queue);
|
||||
}
|
||||
} else if (mbox_status >> 12 == MBOX_ASYNC_EVENT_STATUS) {
|
||||
/* Immediately process the AENs that don't require much work.
|
||||
@@ -686,7 +685,8 @@ irqreturn_t qla4xxx_intr_handler(int irq, void *dev_id)
|
||||
&ha->reg->ctrl_status);
|
||||
readl(&ha->reg->ctrl_status);
|
||||
|
||||
set_bit(DPC_RESET_HA_INTR, &ha->dpc_flags);
|
||||
if (!ql4_mod_unload)
|
||||
set_bit(DPC_RESET_HA_INTR, &ha->dpc_flags);
|
||||
|
||||
break;
|
||||
} else if (intr_status & INTR_PENDING) {
|
||||
|
||||
@@ -29,18 +29,30 @@ int qla4xxx_mailbox_command(struct scsi_qla_host *ha, uint8_t inCount,
|
||||
u_long wait_count;
|
||||
uint32_t intr_status;
|
||||
unsigned long flags = 0;
|
||||
DECLARE_WAITQUEUE(wait, current);
|
||||
|
||||
mutex_lock(&ha->mbox_sem);
|
||||
|
||||
/* Mailbox code active */
|
||||
set_bit(AF_MBOX_COMMAND, &ha->flags);
|
||||
|
||||
/* Make sure that pointers are valid */
|
||||
if (!mbx_cmd || !mbx_sts) {
|
||||
DEBUG2(printk("scsi%ld: %s: Invalid mbx_cmd or mbx_sts "
|
||||
"pointer\n", ha->host_no, __func__));
|
||||
goto mbox_exit;
|
||||
return status;
|
||||
}
|
||||
/* Mailbox code active */
|
||||
wait_count = MBOX_TOV * 100;
|
||||
|
||||
while (wait_count--) {
|
||||
mutex_lock(&ha->mbox_sem);
|
||||
if (!test_bit(AF_MBOX_COMMAND, &ha->flags)) {
|
||||
set_bit(AF_MBOX_COMMAND, &ha->flags);
|
||||
mutex_unlock(&ha->mbox_sem);
|
||||
break;
|
||||
}
|
||||
mutex_unlock(&ha->mbox_sem);
|
||||
if (!wait_count) {
|
||||
DEBUG2(printk("scsi%ld: %s: mbox_sem failed\n",
|
||||
ha->host_no, __func__));
|
||||
return status;
|
||||
}
|
||||
msleep(10);
|
||||
}
|
||||
|
||||
/* To prevent overwriting mailbox registers for a command that has
|
||||
@@ -73,8 +85,6 @@ int qla4xxx_mailbox_command(struct scsi_qla_host *ha, uint8_t inCount,
|
||||
spin_unlock_irqrestore(&ha->hardware_lock, flags);
|
||||
|
||||
/* Wait for completion */
|
||||
set_current_state(TASK_UNINTERRUPTIBLE);
|
||||
add_wait_queue(&ha->mailbox_wait_queue, &wait);
|
||||
|
||||
/*
|
||||
* If we don't want status, don't wait for the mailbox command to
|
||||
@@ -83,8 +93,6 @@ int qla4xxx_mailbox_command(struct scsi_qla_host *ha, uint8_t inCount,
|
||||
*/
|
||||
if (outCount == 0) {
|
||||
status = QLA_SUCCESS;
|
||||
set_current_state(TASK_RUNNING);
|
||||
remove_wait_queue(&ha->mailbox_wait_queue, &wait);
|
||||
goto mbox_exit;
|
||||
}
|
||||
/* Wait for command to complete */
|
||||
@@ -108,8 +116,6 @@ int qla4xxx_mailbox_command(struct scsi_qla_host *ha, uint8_t inCount,
|
||||
spin_unlock_irqrestore(&ha->hardware_lock, flags);
|
||||
msleep(10);
|
||||
}
|
||||
set_current_state(TASK_RUNNING);
|
||||
remove_wait_queue(&ha->mailbox_wait_queue, &wait);
|
||||
|
||||
/* Check for mailbox timeout. */
|
||||
if (!test_bit(AF_MBOX_COMMAND_DONE, &ha->flags)) {
|
||||
@@ -155,9 +161,10 @@ int qla4xxx_mailbox_command(struct scsi_qla_host *ha, uint8_t inCount,
|
||||
spin_unlock_irqrestore(&ha->hardware_lock, flags);
|
||||
|
||||
mbox_exit:
|
||||
mutex_lock(&ha->mbox_sem);
|
||||
clear_bit(AF_MBOX_COMMAND, &ha->flags);
|
||||
clear_bit(AF_MBOX_COMMAND_DONE, &ha->flags);
|
||||
mutex_unlock(&ha->mbox_sem);
|
||||
clear_bit(AF_MBOX_COMMAND_DONE, &ha->flags);
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
@@ -40,6 +40,8 @@ MODULE_PARM_DESC(ql4xextended_error_logging,
|
||||
"Option to enable extended error logging, "
|
||||
"Default is 0 - no logging, 1 - debug logging");
|
||||
|
||||
int ql4_mod_unload = 0;
|
||||
|
||||
/*
|
||||
* SCSI host template entry points
|
||||
*/
|
||||
@@ -422,6 +424,9 @@ static int qla4xxx_queuecommand(struct scsi_cmnd *cmd,
|
||||
goto qc_host_busy;
|
||||
}
|
||||
|
||||
if (test_bit(DPC_RESET_HA_INTR, &ha->dpc_flags))
|
||||
goto qc_host_busy;
|
||||
|
||||
spin_unlock_irq(ha->host->host_lock);
|
||||
|
||||
srb = qla4xxx_get_new_srb(ha, ddb_entry, cmd, done);
|
||||
@@ -707,16 +712,12 @@ static int qla4xxx_cmd_wait(struct scsi_qla_host *ha)
|
||||
return stat;
|
||||
}
|
||||
|
||||
/**
|
||||
* qla4xxx_soft_reset - performs soft reset.
|
||||
* @ha: Pointer to host adapter structure.
|
||||
**/
|
||||
int qla4xxx_soft_reset(struct scsi_qla_host *ha)
|
||||
static void qla4xxx_hw_reset(struct scsi_qla_host *ha)
|
||||
{
|
||||
uint32_t max_wait_time;
|
||||
unsigned long flags = 0;
|
||||
int status = QLA_ERROR;
|
||||
uint32_t ctrl_status;
|
||||
unsigned long flags = 0;
|
||||
|
||||
DEBUG2(printk(KERN_ERR "scsi%ld: %s\n", ha->host_no, __func__));
|
||||
|
||||
spin_lock_irqsave(&ha->hardware_lock, flags);
|
||||
|
||||
@@ -733,6 +734,20 @@ int qla4xxx_soft_reset(struct scsi_qla_host *ha)
|
||||
readl(&ha->reg->ctrl_status);
|
||||
|
||||
spin_unlock_irqrestore(&ha->hardware_lock, flags);
|
||||
}
|
||||
|
||||
/**
|
||||
* qla4xxx_soft_reset - performs soft reset.
|
||||
* @ha: Pointer to host adapter structure.
|
||||
**/
|
||||
int qla4xxx_soft_reset(struct scsi_qla_host *ha)
|
||||
{
|
||||
uint32_t max_wait_time;
|
||||
unsigned long flags = 0;
|
||||
int status = QLA_ERROR;
|
||||
uint32_t ctrl_status;
|
||||
|
||||
qla4xxx_hw_reset(ha);
|
||||
|
||||
/* Wait until the Network Reset Intr bit is cleared */
|
||||
max_wait_time = RESET_INTR_TOV;
|
||||
@@ -966,10 +981,12 @@ static void qla4xxx_do_dpc(struct work_struct *work)
|
||||
struct scsi_qla_host *ha =
|
||||
container_of(work, struct scsi_qla_host, dpc_work);
|
||||
struct ddb_entry *ddb_entry, *dtemp;
|
||||
int status = QLA_ERROR;
|
||||
|
||||
DEBUG2(printk("scsi%ld: %s: DPC handler waking up."
|
||||
"flags = 0x%08lx, dpc_flags = 0x%08lx\n",
|
||||
ha->host_no, __func__, ha->flags, ha->dpc_flags));
|
||||
"flags = 0x%08lx, dpc_flags = 0x%08lx ctrl_stat = 0x%08x\n",
|
||||
ha->host_no, __func__, ha->flags, ha->dpc_flags,
|
||||
readw(&ha->reg->ctrl_status)));
|
||||
|
||||
/* Initialization not yet finished. Don't do anything yet. */
|
||||
if (!test_bit(AF_INIT_DONE, &ha->flags))
|
||||
@@ -983,31 +1000,28 @@ static void qla4xxx_do_dpc(struct work_struct *work)
|
||||
test_bit(DPC_RESET_HA, &ha->dpc_flags))
|
||||
qla4xxx_recover_adapter(ha, PRESERVE_DDB_LIST);
|
||||
|
||||
if (test_and_clear_bit(DPC_RESET_HA_INTR, &ha->dpc_flags)) {
|
||||
if (test_bit(DPC_RESET_HA_INTR, &ha->dpc_flags)) {
|
||||
uint8_t wait_time = RESET_INTR_TOV;
|
||||
unsigned long flags = 0;
|
||||
|
||||
qla4xxx_flush_active_srbs(ha);
|
||||
|
||||
spin_lock_irqsave(&ha->hardware_lock, flags);
|
||||
while ((readw(&ha->reg->ctrl_status) &
|
||||
(CSR_SOFT_RESET | CSR_FORCE_SOFT_RESET)) != 0) {
|
||||
if (--wait_time == 0)
|
||||
break;
|
||||
|
||||
spin_unlock_irqrestore(&ha->hardware_lock,
|
||||
flags);
|
||||
|
||||
msleep(1000);
|
||||
|
||||
spin_lock_irqsave(&ha->hardware_lock, flags);
|
||||
}
|
||||
spin_unlock_irqrestore(&ha->hardware_lock, flags);
|
||||
|
||||
if (wait_time == 0)
|
||||
DEBUG2(printk("scsi%ld: %s: SR|FSR "
|
||||
"bit not cleared-- resetting\n",
|
||||
ha->host_no, __func__));
|
||||
qla4xxx_flush_active_srbs(ha);
|
||||
if (ql4xxx_lock_drvr_wait(ha) == QLA_SUCCESS) {
|
||||
qla4xxx_process_aen(ha, FLUSH_DDB_CHANGED_AENS);
|
||||
status = qla4xxx_initialize_adapter(ha,
|
||||
PRESERVE_DDB_LIST);
|
||||
}
|
||||
clear_bit(DPC_RESET_HA_INTR, &ha->dpc_flags);
|
||||
if (status == QLA_SUCCESS)
|
||||
qla4xxx_enable_intrs(ha);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1062,7 +1076,7 @@ static void qla4xxx_free_adapter(struct scsi_qla_host *ha)
|
||||
|
||||
/* Issue Soft Reset to put firmware in unknown state */
|
||||
if (ql4xxx_lock_drvr_wait(ha) == QLA_SUCCESS)
|
||||
qla4xxx_soft_reset(ha);
|
||||
qla4xxx_hw_reset(ha);
|
||||
|
||||
/* Remove timer thread, if present */
|
||||
if (ha->timer_active)
|
||||
@@ -1198,7 +1212,6 @@ static int __devinit qla4xxx_probe_adapter(struct pci_dev *pdev,
|
||||
INIT_LIST_HEAD(&ha->free_srb_q);
|
||||
|
||||
mutex_init(&ha->mbox_sem);
|
||||
init_waitqueue_head(&ha->mailbox_wait_queue);
|
||||
|
||||
spin_lock_init(&ha->hardware_lock);
|
||||
|
||||
@@ -1665,6 +1678,7 @@ static int __init qla4xxx_module_init(void)
|
||||
|
||||
static void __exit qla4xxx_module_exit(void)
|
||||
{
|
||||
ql4_mod_unload = 1;
|
||||
pci_unregister_driver(&qla4xxx_pci_driver);
|
||||
iscsi_unregister_transport(&qla4xxx_iscsi_transport);
|
||||
kmem_cache_destroy(srb_cachep);
|
||||
|
||||
@@ -5,4 +5,4 @@
|
||||
* See LICENSE.qla4xxx for copyright and licensing details.
|
||||
*/
|
||||
|
||||
#define QLA4XXX_DRIVER_VERSION "5.00.07-k"
|
||||
#define QLA4XXX_DRIVER_VERSION "5.00.07-k1"
|
||||
|
||||
@@ -1453,6 +1453,12 @@ struct scsi_device *__scsi_add_device(struct Scsi_Host *shost, uint channel,
|
||||
struct device *parent = &shost->shost_gendev;
|
||||
struct scsi_target *starget;
|
||||
|
||||
if (strncmp(scsi_scan_type, "none", 4) == 0)
|
||||
return ERR_PTR(-ENODEV);
|
||||
|
||||
if (!shost->async_scan)
|
||||
scsi_complete_async_scans();
|
||||
|
||||
starget = scsi_alloc_target(parent, channel, id);
|
||||
if (!starget)
|
||||
return ERR_PTR(-ENOMEM);
|
||||
|
||||
@@ -1647,16 +1647,6 @@ static int sd_probe(struct device *dev)
|
||||
if (error)
|
||||
goto out_put;
|
||||
|
||||
class_device_initialize(&sdkp->cdev);
|
||||
sdkp->cdev.dev = &sdp->sdev_gendev;
|
||||
sdkp->cdev.class = &sd_disk_class;
|
||||
strncpy(sdkp->cdev.class_id, sdp->sdev_gendev.bus_id, BUS_ID_SIZE);
|
||||
|
||||
if (class_device_add(&sdkp->cdev))
|
||||
goto out_put;
|
||||
|
||||
get_device(&sdp->sdev_gendev);
|
||||
|
||||
sdkp->device = sdp;
|
||||
sdkp->driver = &sd_template;
|
||||
sdkp->disk = gd;
|
||||
@@ -1670,6 +1660,16 @@ static int sd_probe(struct device *dev)
|
||||
sdp->timeout = SD_MOD_TIMEOUT;
|
||||
}
|
||||
|
||||
class_device_initialize(&sdkp->cdev);
|
||||
sdkp->cdev.dev = &sdp->sdev_gendev;
|
||||
sdkp->cdev.class = &sd_disk_class;
|
||||
strncpy(sdkp->cdev.class_id, sdp->sdev_gendev.bus_id, BUS_ID_SIZE);
|
||||
|
||||
if (class_device_add(&sdkp->cdev))
|
||||
goto out_put;
|
||||
|
||||
get_device(&sdp->sdev_gendev);
|
||||
|
||||
gd->major = sd_major((index & 0xf0) >> 4);
|
||||
gd->first_minor = ((index & 0xf) << 4) | (index & 0xfff00);
|
||||
gd->minors = 16;
|
||||
|
||||
@@ -2816,15 +2816,18 @@ static int st_int_ioctl(struct scsi_tape *STp, unsigned int cmd_in, unsigned lon
|
||||
|
||||
if (cmd_in == MTWEOF &&
|
||||
cmdstatp->have_sense &&
|
||||
(cmdstatp->flags & SENSE_EOM) &&
|
||||
(cmdstatp->sense_hdr.sense_key == NO_SENSE ||
|
||||
cmdstatp->sense_hdr.sense_key == RECOVERED_ERROR) &&
|
||||
undone == 0) {
|
||||
ioctl_result = 0; /* EOF written successfully at EOM */
|
||||
if (fileno >= 0)
|
||||
fileno++;
|
||||
(cmdstatp->flags & SENSE_EOM)) {
|
||||
if (cmdstatp->sense_hdr.sense_key == NO_SENSE ||
|
||||
cmdstatp->sense_hdr.sense_key == RECOVERED_ERROR) {
|
||||
ioctl_result = 0; /* EOF(s) written successfully at EOM */
|
||||
STps->eof = ST_NOEOF;
|
||||
} else { /* Writing EOF(s) failed */
|
||||
if (fileno >= 0)
|
||||
fileno -= undone;
|
||||
if (undone < arg)
|
||||
STps->eof = ST_NOEOF;
|
||||
}
|
||||
STps->drv_file = fileno;
|
||||
STps->eof = ST_NOEOF;
|
||||
} else if ((cmd_in == MTFSF) || (cmd_in == MTFSFM)) {
|
||||
if (fileno >= 0)
|
||||
STps->drv_file = fileno - undone;
|
||||
|
||||
@@ -284,7 +284,8 @@ static int write_mii_word(rtl8150_t * dev, u8 phy, __u8 indx, u16 reg)
|
||||
u8 data[3], tmp;
|
||||
|
||||
data[0] = phy;
|
||||
*(data + 1) = cpu_to_le16p(®);
|
||||
data[1] = reg & 0xff;
|
||||
data[2] = (reg >> 8) & 0xff;
|
||||
tmp = indx | PHY_WRITE | PHY_GO;
|
||||
i = 0;
|
||||
|
||||
|
||||
20
fs/aio.c
20
fs/aio.c
@@ -298,17 +298,23 @@ static void wait_for_all_aios(struct kioctx *ctx)
|
||||
struct task_struct *tsk = current;
|
||||
DECLARE_WAITQUEUE(wait, tsk);
|
||||
|
||||
spin_lock_irq(&ctx->ctx_lock);
|
||||
if (!ctx->reqs_active)
|
||||
return;
|
||||
goto out;
|
||||
|
||||
add_wait_queue(&ctx->wait, &wait);
|
||||
set_task_state(tsk, TASK_UNINTERRUPTIBLE);
|
||||
while (ctx->reqs_active) {
|
||||
spin_unlock_irq(&ctx->ctx_lock);
|
||||
schedule();
|
||||
set_task_state(tsk, TASK_UNINTERRUPTIBLE);
|
||||
spin_lock_irq(&ctx->ctx_lock);
|
||||
}
|
||||
__set_task_state(tsk, TASK_RUNNING);
|
||||
remove_wait_queue(&ctx->wait, &wait);
|
||||
|
||||
out:
|
||||
spin_unlock_irq(&ctx->ctx_lock);
|
||||
}
|
||||
|
||||
/* wait_on_sync_kiocb:
|
||||
@@ -424,7 +430,6 @@ static struct kiocb fastcall *__aio_get_req(struct kioctx *ctx)
|
||||
ring = kmap_atomic(ctx->ring_info.ring_pages[0], KM_USER0);
|
||||
if (ctx->reqs_active < aio_ring_avail(&ctx->ring_info, ring)) {
|
||||
list_add(&req->ki_list, &ctx->active_reqs);
|
||||
get_ioctx(ctx);
|
||||
ctx->reqs_active++;
|
||||
okay = 1;
|
||||
}
|
||||
@@ -536,8 +541,6 @@ int fastcall aio_put_req(struct kiocb *req)
|
||||
spin_lock_irq(&ctx->ctx_lock);
|
||||
ret = __aio_put_req(ctx, req);
|
||||
spin_unlock_irq(&ctx->ctx_lock);
|
||||
if (ret)
|
||||
put_ioctx(ctx);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -779,8 +782,7 @@ static int __aio_run_iocbs(struct kioctx *ctx)
|
||||
*/
|
||||
iocb->ki_users++; /* grab extra reference */
|
||||
aio_run_iocb(iocb);
|
||||
if (__aio_put_req(ctx, iocb)) /* drop extra ref */
|
||||
put_ioctx(ctx);
|
||||
__aio_put_req(ctx, iocb);
|
||||
}
|
||||
if (!list_empty(&ctx->run_list))
|
||||
return 1;
|
||||
@@ -997,14 +999,10 @@ int fastcall aio_complete(struct kiocb *iocb, long res, long res2)
|
||||
/* everything turned out well, dispose of the aiocb. */
|
||||
ret = __aio_put_req(ctx, iocb);
|
||||
|
||||
spin_unlock_irqrestore(&ctx->ctx_lock, flags);
|
||||
|
||||
if (waitqueue_active(&ctx->wait))
|
||||
wake_up(&ctx->wait);
|
||||
|
||||
if (ret)
|
||||
put_ioctx(ctx);
|
||||
|
||||
spin_unlock_irqrestore(&ctx->ctx_lock, flags);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
@@ -129,6 +129,46 @@ blkdev_get_block(struct inode *inode, sector_t iblock,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
blkdev_get_blocks(struct inode *inode, sector_t iblock,
|
||||
struct buffer_head *bh, int create)
|
||||
{
|
||||
sector_t end_block = max_block(I_BDEV(inode));
|
||||
unsigned long max_blocks = bh->b_size >> inode->i_blkbits;
|
||||
|
||||
if ((iblock + max_blocks) > end_block) {
|
||||
max_blocks = end_block - iblock;
|
||||
if ((long)max_blocks <= 0) {
|
||||
if (create)
|
||||
return -EIO; /* write fully beyond EOF */
|
||||
/*
|
||||
* It is a read which is fully beyond EOF. We return
|
||||
* a !buffer_mapped buffer
|
||||
*/
|
||||
max_blocks = 0;
|
||||
}
|
||||
}
|
||||
|
||||
bh->b_bdev = I_BDEV(inode);
|
||||
bh->b_blocknr = iblock;
|
||||
bh->b_size = max_blocks << inode->i_blkbits;
|
||||
if (max_blocks)
|
||||
set_buffer_mapped(bh);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static ssize_t
|
||||
blkdev_direct_IO(int rw, struct kiocb *iocb, const struct iovec *iov,
|
||||
loff_t offset, unsigned long nr_segs)
|
||||
{
|
||||
struct file *file = iocb->ki_filp;
|
||||
struct inode *inode = file->f_mapping->host;
|
||||
|
||||
return blockdev_direct_IO_no_locking(rw, iocb, inode, I_BDEV(inode),
|
||||
iov, offset, nr_segs, blkdev_get_blocks, NULL);
|
||||
}
|
||||
|
||||
#if 0
|
||||
static int blk_end_aio(struct bio *bio, unsigned int bytes_done, int error)
|
||||
{
|
||||
struct kiocb *iocb = bio->bi_private;
|
||||
@@ -323,6 +363,7 @@ blkdev_direct_IO(int rw, struct kiocb *iocb, const struct iovec *iov,
|
||||
return PTR_ERR(page);
|
||||
goto completion;
|
||||
}
|
||||
#endif
|
||||
|
||||
static int blkdev_writepage(struct page *page, struct writeback_control *wbc)
|
||||
{
|
||||
|
||||
@@ -269,7 +269,7 @@ fh_verify(struct svc_rqst *rqstp, struct svc_fh *fhp, int type, int access)
|
||||
"acc=%x, error=%d\n",
|
||||
dentry->d_parent->d_name.name,
|
||||
dentry->d_name.name,
|
||||
access, (error >> 24));
|
||||
access, ntohl(error));
|
||||
}
|
||||
out:
|
||||
if (exp && !IS_ERR(exp))
|
||||
|
||||
@@ -2328,13 +2328,23 @@ static int proc_task_readdir(struct file * filp, void * dirent, filldir_t filldi
|
||||
{
|
||||
struct dentry *dentry = filp->f_path.dentry;
|
||||
struct inode *inode = dentry->d_inode;
|
||||
struct task_struct *leader = get_proc_task(inode);
|
||||
struct task_struct *leader = NULL;
|
||||
struct task_struct *task;
|
||||
int retval = -ENOENT;
|
||||
ino_t ino;
|
||||
int tid;
|
||||
unsigned long pos = filp->f_pos; /* avoiding "long long" filp->f_pos */
|
||||
|
||||
task = get_proc_task(inode);
|
||||
if (!task)
|
||||
goto out_no_task;
|
||||
rcu_read_lock();
|
||||
if (pid_alive(task)) {
|
||||
leader = task->group_leader;
|
||||
get_task_struct(leader);
|
||||
}
|
||||
rcu_read_unlock();
|
||||
put_task_struct(task);
|
||||
if (!leader)
|
||||
goto out_no_task;
|
||||
retval = 0;
|
||||
|
||||
@@ -342,9 +342,14 @@
|
||||
#define __NR_io_cancel 402
|
||||
#define __NR_exit_group 405
|
||||
#define __NR_lookup_dcookie 406
|
||||
#define __NR_sys_epoll_create 407
|
||||
#define __NR_sys_epoll_ctl 408
|
||||
#define __NR_sys_epoll_wait 409
|
||||
#define __NR_epoll_create 407
|
||||
#define __NR_epoll_ctl 408
|
||||
#define __NR_epoll_wait 409
|
||||
/* Feb 2007: These three sys_epoll defines shouldn't be here but culling
|
||||
* them would break userspace apps ... we'll kill them off in 2010 :) */
|
||||
#define __NR_sys_epoll_create __NR_epoll_create
|
||||
#define __NR_sys_epoll_ctl __NR_epoll_ctl
|
||||
#define __NR_sys_epoll_wait __NR_epoll_wait
|
||||
#define __NR_remap_file_pages 410
|
||||
#define __NR_set_tid_address 411
|
||||
#define __NR_restart_syscall 412
|
||||
|
||||
@@ -1 +1,7 @@
|
||||
include include/asm-generic/Kbuild.asm
|
||||
|
||||
header-y += registers.h
|
||||
|
||||
unifdef-y += termios.h
|
||||
unifdef-y += ptrace.h
|
||||
unifdef-y += page.h
|
||||
|
||||
@@ -76,8 +76,6 @@ extern unsigned long max_pfn;
|
||||
|
||||
#endif /* __ASSEMBLY__ */
|
||||
|
||||
#endif /* __KERNEL__ */
|
||||
|
||||
#ifdef CONFIG_CONTIGUOUS_PAGE_ALLOC
|
||||
#define WANT_PAGE_VIRTUAL 1
|
||||
#endif
|
||||
@@ -85,4 +83,6 @@ extern unsigned long max_pfn;
|
||||
#include <asm-generic/memory_model.h>
|
||||
#include <asm-generic/page.h>
|
||||
|
||||
#endif /* __KERNEL__ */
|
||||
|
||||
#endif /* _ASM_PAGE_H */
|
||||
|
||||
@@ -12,9 +12,11 @@
|
||||
#define _ASM_PTRACE_H
|
||||
|
||||
#include <asm/registers.h>
|
||||
#ifdef __KERNEL__
|
||||
#include <asm/irq_regs.h>
|
||||
|
||||
#define in_syscall(regs) (((regs)->tbr & TBR_TT) == TBR_TT_TRAP0)
|
||||
#endif
|
||||
|
||||
|
||||
#define PT_PSR 0
|
||||
@@ -60,6 +62,7 @@
|
||||
#define PTRACE_GETFDPIC_EXEC 0 /* [addr] request the executable loadmap */
|
||||
#define PTRACE_GETFDPIC_INTERP 1 /* [addr] request the interpreter loadmap */
|
||||
|
||||
#ifdef __KERNEL__
|
||||
#ifndef __ASSEMBLY__
|
||||
|
||||
/*
|
||||
@@ -74,6 +77,7 @@ register struct pt_regs *__frame asm("gr28");
|
||||
extern unsigned long user_stack(const struct pt_regs *);
|
||||
extern void show_regs(struct pt_regs *);
|
||||
#define profile_pc(regs) ((regs)->pc)
|
||||
#endif
|
||||
|
||||
#endif /* !__ASSEMBLY__ */
|
||||
#endif /* _ASM_PTRACE_H */
|
||||
|
||||
@@ -69,6 +69,8 @@ struct termio {
|
||||
#define N_SYNC_PPP 14
|
||||
#define N_HCI 15 /* Bluetooth HCI UART */
|
||||
|
||||
#ifdef __KERNEL__
|
||||
#include <asm-generic/termios.h>
|
||||
#endif
|
||||
|
||||
#endif /* _ASM_TERMIOS_H */
|
||||
|
||||
@@ -151,7 +151,7 @@ static inline __sum16 ip_fast_csum(const void *iph, unsigned int ihl)
|
||||
"xnor\t%%g0, %0, %0"
|
||||
: "=r" (sum), "=&r" (iph)
|
||||
: "r" (ihl), "1" (iph)
|
||||
: "g2", "g3", "g4", "cc");
|
||||
: "g2", "g3", "g4", "cc", "memory");
|
||||
return sum;
|
||||
}
|
||||
|
||||
|
||||
@@ -408,6 +408,15 @@ static inline pte_t pte_modify(pte_t pte, pgprot_t newprot)
|
||||
|
||||
#include <asm-generic/pgtable-nopud.h>
|
||||
|
||||
#ifdef CONFIG_HIGHMEM
|
||||
/* Clear a kernel PTE and flush it from the TLB */
|
||||
#define kpte_clear_flush(ptep, vaddr) \
|
||||
do { \
|
||||
pte_clear(&init_mm, vaddr, ptep); \
|
||||
__flush_tlb_one(vaddr); \
|
||||
} while (0)
|
||||
#endif
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
@@ -63,6 +63,9 @@ static inline int dma_mapping_error(dma_addr_t dma_addr)
|
||||
return (dma_addr == bad_dma_address);
|
||||
}
|
||||
|
||||
#define dma_alloc_noncoherent(d, s, h, f) dma_alloc_coherent(d, s, h, f)
|
||||
#define dma_free_noncoherent(d, s, v, h) dma_free_coherent(d, s, v, h)
|
||||
|
||||
extern void *dma_alloc_coherent(struct device *dev, size_t size,
|
||||
dma_addr_t *dma_handle, gfp_t gfp);
|
||||
extern void dma_free_coherent(struct device *dev, size_t size, void *vaddr,
|
||||
|
||||
@@ -301,7 +301,7 @@ extern int __init efi_uart_console_only (void);
|
||||
extern void efi_initialize_iomem_resources(struct resource *code_resource,
|
||||
struct resource *data_resource);
|
||||
extern unsigned long efi_get_time(void);
|
||||
extern int __init efi_set_rtc_mmss(unsigned long nowtime);
|
||||
extern int efi_set_rtc_mmss(unsigned long nowtime);
|
||||
extern int is_available_memory(efi_memory_desc_t * md);
|
||||
extern struct efi_memory_map memmap;
|
||||
|
||||
|
||||
@@ -1054,6 +1054,8 @@ static inline void ata_pause(struct ata_port *ap)
|
||||
/**
|
||||
* ata_busy_wait - Wait for a port status register
|
||||
* @ap: Port to wait for.
|
||||
* @bits: bits that must be clear
|
||||
* @max: number of 10uS waits to perform
|
||||
*
|
||||
* Waits up to max*10 microseconds for the selected bits in the port's
|
||||
* status register to be cleared.
|
||||
|
||||
@@ -1313,7 +1313,7 @@ noinline struct pt_regs * __devinit __attribute__((weak)) idle_regs(struct pt_re
|
||||
return regs;
|
||||
}
|
||||
|
||||
struct task_struct * __devinit fork_idle(int cpu)
|
||||
struct task_struct * __cpuinit fork_idle(int cpu)
|
||||
{
|
||||
struct task_struct *task;
|
||||
struct pt_regs regs;
|
||||
|
||||
@@ -989,8 +989,7 @@ int zone_watermark_ok(struct zone *z, int order, unsigned long mark,
|
||||
int classzone_idx, int alloc_flags)
|
||||
{
|
||||
/* free_pages my go negative - that's OK */
|
||||
unsigned long min = mark;
|
||||
long free_pages = z->free_pages - (1 << order) + 1;
|
||||
long min = mark, free_pages = z->free_pages - (1 << order) + 1;
|
||||
int o;
|
||||
|
||||
if (alloc_flags & ALLOC_HIGH)
|
||||
|
||||
@@ -374,9 +374,11 @@ static int ctnetlink_conntrack_event(struct notifier_block *this,
|
||||
&& ctnetlink_dump_helpinfo(skb, ct) < 0)
|
||||
goto nfattr_failure;
|
||||
|
||||
#ifdef CONFIG_IP_NF_CONNTRACK_MARK
|
||||
if ((events & IPCT_MARK || ct->mark)
|
||||
&& ctnetlink_dump_mark(skb, ct) < 0)
|
||||
goto nfattr_failure;
|
||||
#endif
|
||||
|
||||
if (events & IPCT_COUNTER_FILLING &&
|
||||
(ctnetlink_dump_counters(skb, ct, IP_CT_DIR_ORIGINAL) < 0 ||
|
||||
|
||||
@@ -283,10 +283,16 @@ static int skp_epaddr_len(const char *dptr, const char *limit, int *shift)
|
||||
{
|
||||
int s = *shift;
|
||||
|
||||
for (; dptr <= limit && *dptr != '@'; dptr++)
|
||||
/* Search for @, but stop at the end of the line.
|
||||
* We are inside a sip: URI, so we don't need to worry about
|
||||
* continuation lines. */
|
||||
while (dptr <= limit &&
|
||||
*dptr != '@' && *dptr != '\r' && *dptr != '\n') {
|
||||
(*shift)++;
|
||||
dptr++;
|
||||
}
|
||||
|
||||
if (*dptr == '@') {
|
||||
if (dptr <= limit && *dptr == '@') {
|
||||
dptr++;
|
||||
(*shift)++;
|
||||
} else
|
||||
|
||||
@@ -3393,7 +3393,7 @@ static void inline ipv6_store_devconf(struct ipv6_devconf *cnf,
|
||||
#ifdef CONFIG_IPV6_ROUTER_PREF
|
||||
array[DEVCONF_ACCEPT_RA_RTR_PREF] = cnf->accept_ra_rtr_pref;
|
||||
array[DEVCONF_RTR_PROBE_INTERVAL] = cnf->rtr_probe_interval;
|
||||
#ifdef CONFIV_IPV6_ROUTE_INFO
|
||||
#ifdef CONFIG_IPV6_ROUTE_INFO
|
||||
array[DEVCONF_ACCEPT_RA_RT_INFO_MAX_PLEN] = cnf->accept_ra_rt_info_max_plen;
|
||||
#endif
|
||||
#endif
|
||||
@@ -3898,7 +3898,7 @@ static struct addrconf_sysctl_table
|
||||
.proc_handler = &proc_dointvec_jiffies,
|
||||
.strategy = &sysctl_jiffies,
|
||||
},
|
||||
#ifdef CONFIV_IPV6_ROUTE_INFO
|
||||
#ifdef CONFIG_IPV6_ROUTE_INFO
|
||||
{
|
||||
.ctl_name = NET_IPV6_ACCEPT_RA_RT_INFO_MAX_PLEN,
|
||||
.procname = "accept_ra_rt_info_max_plen",
|
||||
|
||||
@@ -1413,6 +1413,13 @@ void ndisc_send_redirect(struct sk_buff *skb, struct neighbour *neigh,
|
||||
return;
|
||||
}
|
||||
|
||||
if (!ipv6_addr_equal(&skb->nh.ipv6h->daddr, target) &&
|
||||
!(ipv6_addr_type(target) & IPV6_ADDR_LINKLOCAL)) {
|
||||
ND_PRINTK2(KERN_WARNING
|
||||
"ICMPv6 Redirect: target address is not link-local.\n");
|
||||
return;
|
||||
}
|
||||
|
||||
ndisc_flow_init(&fl, NDISC_REDIRECT, &saddr_buf, &skb->nh.ipv6h->saddr,
|
||||
dev->ifindex);
|
||||
|
||||
|
||||
@@ -165,7 +165,7 @@ config NF_CONNTRACK_FTP
|
||||
|
||||
config NF_CONNTRACK_H323
|
||||
tristate "H.323 protocol support (EXPERIMENTAL)"
|
||||
depends on EXPERIMENTAL && NF_CONNTRACK
|
||||
depends on EXPERIMENTAL && NF_CONNTRACK && (IPV6 || IPV6=n)
|
||||
help
|
||||
H.323 is a VoIP signalling protocol from ITU-T. As one of the most
|
||||
important VoIP protocols, it is widely used by voice hardware and
|
||||
@@ -628,7 +628,7 @@ config NETFILTER_XT_MATCH_TCPMSS
|
||||
|
||||
config NETFILTER_XT_MATCH_HASHLIMIT
|
||||
tristate '"hashlimit" match support'
|
||||
depends on NETFILTER_XTABLES
|
||||
depends on NETFILTER_XTABLES && (IP6_NF_IPTABLES || IP6_NF_IPTABLES=n)
|
||||
help
|
||||
This option adds a `hashlimit' match.
|
||||
|
||||
|
||||
@@ -389,9 +389,11 @@ static int ctnetlink_conntrack_event(struct notifier_block *this,
|
||||
&& ctnetlink_dump_helpinfo(skb, ct) < 0)
|
||||
goto nfattr_failure;
|
||||
|
||||
#ifdef CONFIG_NF_CONNTRACK_MARK
|
||||
if ((events & IPCT_MARK || ct->mark)
|
||||
&& ctnetlink_dump_mark(skb, ct) < 0)
|
||||
goto nfattr_failure;
|
||||
#endif
|
||||
|
||||
if (events & IPCT_COUNTER_FILLING &&
|
||||
(ctnetlink_dump_counters(skb, ct, IP_CT_DIR_ORIGINAL) < 0 ||
|
||||
|
||||
@@ -303,10 +303,16 @@ static int skp_epaddr_len(struct nf_conn *ct, const char *dptr,
|
||||
{
|
||||
int s = *shift;
|
||||
|
||||
for (; dptr <= limit && *dptr != '@'; dptr++)
|
||||
/* Search for @, but stop at the end of the line.
|
||||
* We are inside a sip: URI, so we don't need to worry about
|
||||
* continuation lines. */
|
||||
while (dptr <= limit &&
|
||||
*dptr != '@' && *dptr != '\r' && *dptr != '\n') {
|
||||
(*shift)++;
|
||||
dptr++;
|
||||
}
|
||||
|
||||
if (*dptr == '@') {
|
||||
if (dptr <= limit && *dptr == '@') {
|
||||
dptr++;
|
||||
(*shift)++;
|
||||
} else
|
||||
|
||||
@@ -52,6 +52,8 @@ match(const struct sk_buff *skb,
|
||||
{
|
||||
const struct xt_connbytes_info *sinfo = matchinfo;
|
||||
u_int64_t what = 0; /* initialize to make gcc happy */
|
||||
u_int64_t bytes = 0;
|
||||
u_int64_t pkts = 0;
|
||||
const struct ip_conntrack_counter *counters;
|
||||
|
||||
if (!(counters = nf_ct_get_counters(skb)))
|
||||
@@ -89,29 +91,22 @@ match(const struct sk_buff *skb,
|
||||
case XT_CONNBYTES_AVGPKT:
|
||||
switch (sinfo->direction) {
|
||||
case XT_CONNBYTES_DIR_ORIGINAL:
|
||||
what = div64_64(counters[IP_CT_DIR_ORIGINAL].bytes,
|
||||
counters[IP_CT_DIR_ORIGINAL].packets);
|
||||
bytes = counters[IP_CT_DIR_ORIGINAL].bytes;
|
||||
pkts = counters[IP_CT_DIR_ORIGINAL].packets;
|
||||
break;
|
||||
case XT_CONNBYTES_DIR_REPLY:
|
||||
what = div64_64(counters[IP_CT_DIR_REPLY].bytes,
|
||||
counters[IP_CT_DIR_REPLY].packets);
|
||||
bytes = counters[IP_CT_DIR_REPLY].bytes;
|
||||
pkts = counters[IP_CT_DIR_REPLY].packets;
|
||||
break;
|
||||
case XT_CONNBYTES_DIR_BOTH:
|
||||
{
|
||||
u_int64_t bytes;
|
||||
u_int64_t pkts;
|
||||
bytes = counters[IP_CT_DIR_ORIGINAL].bytes +
|
||||
counters[IP_CT_DIR_REPLY].bytes;
|
||||
pkts = counters[IP_CT_DIR_ORIGINAL].packets+
|
||||
counters[IP_CT_DIR_REPLY].packets;
|
||||
|
||||
/* FIXME_THEORETICAL: what to do if sum
|
||||
* overflows ? */
|
||||
|
||||
what = div64_64(bytes, pkts);
|
||||
}
|
||||
bytes = counters[IP_CT_DIR_ORIGINAL].bytes +
|
||||
counters[IP_CT_DIR_REPLY].bytes;
|
||||
pkts = counters[IP_CT_DIR_ORIGINAL].packets +
|
||||
counters[IP_CT_DIR_REPLY].packets;
|
||||
break;
|
||||
}
|
||||
if (pkts != 0)
|
||||
what = div64_64(bytes, pkts);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
@@ -55,7 +55,8 @@ static int ipt_init_target(struct ipt_entry_target *t, char *table, unsigned int
|
||||
struct ipt_target *target;
|
||||
int ret = 0;
|
||||
|
||||
target = xt_find_target(AF_INET, t->u.user.name, t->u.user.revision);
|
||||
target = xt_request_find_target(AF_INET, t->u.user.name,
|
||||
t->u.user.revision);
|
||||
if (!target)
|
||||
return -ENOENT;
|
||||
|
||||
@@ -63,9 +64,10 @@ static int ipt_init_target(struct ipt_entry_target *t, char *table, unsigned int
|
||||
|
||||
ret = xt_check_target(target, AF_INET, t->u.target_size - sizeof(*t),
|
||||
table, hook, 0, 0);
|
||||
if (ret)
|
||||
if (ret) {
|
||||
module_put(t->u.kernel.target->me);
|
||||
return ret;
|
||||
|
||||
}
|
||||
if (t->u.kernel.target->checkentry
|
||||
&& !t->u.kernel.target->checkentry(table, NULL,
|
||||
t->u.kernel.target, t->data,
|
||||
|
||||
@@ -621,7 +621,13 @@ static void sctp_cmd_transport_on(sctp_cmd_seq_t *cmds,
|
||||
/* The receiver of the HEARTBEAT ACK should also perform an
|
||||
* RTT measurement for that destination transport address
|
||||
* using the time value carried in the HEARTBEAT ACK chunk.
|
||||
* If the transport's rto_pending variable has been cleared,
|
||||
* it was most likely due to a retransmit. However, we want
|
||||
* to re-enable it to properly update the rto.
|
||||
*/
|
||||
if (t->rto_pending == 0)
|
||||
t->rto_pending = 1;
|
||||
|
||||
hbinfo = (sctp_sender_hb_info_t *) chunk->skb->data;
|
||||
sctp_transport_update_rto(t, (jiffies - hbinfo->sent_at));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user