Commit 810df8fd authored by Anton Blanchard's avatar Anton Blanchard

Merge samba.org:/scratch/anton/linux-2.5

into samba.org:/scratch/anton/sfr
parents b2f87157 15f1049d
......@@ -90,6 +90,12 @@ M: Philip.Blundell@pobox.com
L: linux-net@vger.kernel.org
S: Maintained
3CR990 NETWORK DRIVER
P: David Dillow
M: dave@thedillows.org
L: linux-net@vger.kernel.org
S: Maintained
53C700 AND 53C700-66 SCSI DRIVER
P: James E.J. Bottomley
M: James.Bottomley@HansenPartnership.com
......
VERSION = 2
PATCHLEVEL = 5
SUBLEVEL = 60
SUBLEVEL = 61
EXTRAVERSION =
# *DOCUMENTATION*
......
......@@ -26,9 +26,13 @@
#include <linux/init.h>
#include <linux/acpi.h>
#include <asm/pgalloc.h>
#include <asm/apic.h>
#include <asm/mpspec.h>
#if defined (CONFIG_X86_LOCAL_APIC)
#include <mach_apic.h>
#include <mach_mpparse.h>
#endif
#define PREFIX "ACPI: "
......
......@@ -67,7 +67,7 @@ static int mobile_vid_table[32] = {
/* divide by 10 to get FID. */
static int fid_codes[32] = {
110, 115, 120, 125, 50, 55, 60, 65,
70, 75, 80, 85, 90, 95, 10, 105,
70, 75, 80, 85, 90, 95, 100, 105,
30, 190, 40, 200, 130, 135, 140, 210,
150, 225, 160, 165, 170, 180, -1, -1,
};
......
......@@ -530,11 +530,9 @@ void do_syscall_trace(struct pt_regs *regs, int entryexit)
return;
/* the 0x80 provides a way for the tracing parent to distinguish
between a syscall stop and SIGTRAP delivery */
current->exit_code = SIGTRAP | ((current->ptrace & PT_TRACESYSGOOD)
? 0x80 : 0);
current->state = TASK_STOPPED;
notify_parent(current, SIGCHLD);
schedule();
ptrace_notify(SIGTRAP | ((current->ptrace & PT_TRACESYSGOOD)
? 0x80 : 0));
/*
* this isn't the same as continuing with a signal, but it will do
* for normal use. strace only continues with a signal if the
......
......@@ -32,6 +32,8 @@ unsigned long saved_context_eax, saved_context_ebx, saved_context_ecx, saved_con
unsigned long saved_context_esp, saved_context_ebp, saved_context_esi, saved_context_edi;
unsigned long saved_context_eflags;
extern void enable_sep_cpu(void *);
void save_processor_state(void)
{
kernel_fpu_begin();
......@@ -96,6 +98,12 @@ void restore_processor_state(void)
asm volatile ("lidt %0" :: "m" (saved_context.idt_limit));
asm volatile ("lldt %0" :: "m" (saved_context.ldt));
/*
* sysenter MSRs
*/
if (boot_cpu_has(X86_FEATURE_SEP))
enable_sep_cpu(NULL);
fix_processor_context();
do_fpu_end();
}
......
......@@ -35,7 +35,7 @@ struct fake_sep_struct {
unsigned char stack[0];
} __attribute__((aligned(8192)));
static void __init enable_sep_cpu(void *info)
void enable_sep_cpu(void *info)
{
int cpu = get_cpu();
struct tss_struct *tss = init_tss + cpu;
......
......@@ -75,6 +75,11 @@ config ACPI_SLEEP
This option is not recommended for anyone except those doing driver
power management development.
config ACPI_SLEEP_PROC_FS
bool
depends on ACPI_SLEEP && PROC_FS
default y
config ACPI_AC
tristate "AC Adapter"
depends on X86 && ACPI && !ACPI_HT_ONLY
......
......@@ -143,9 +143,9 @@ acpi_os_get_root_pointer(u32 flags, struct acpi_pointer *addr)
#ifdef CONFIG_ACPI_EFI
addr->pointer_type = ACPI_PHYSICAL_POINTER;
if (efi.acpi20)
addr->pointer.physical = (ACPI_PHYSICAL_ADDRESS) virt_to_phys(efi.acpi20);
addr->pointer.physical = (acpi_physical_address) virt_to_phys(efi.acpi20);
else if (efi.acpi)
addr->pointer.physical = (ACPI_PHYSICAL_ADDRESS) virt_to_phys(efi.acpi);
addr->pointer.physical = (acpi_physical_address) virt_to_phys(efi.acpi);
else {
printk(KERN_ERR PREFIX "System description tables not found\n");
return AE_NOT_FOUND;
......
......@@ -185,7 +185,7 @@ acpi_pci_bind (
*/
data->dev = pci_find_slot(data->id.bus, PCI_DEVFN(data->id.device, data->id.function));
if (!data->dev) {
ACPI_DEBUG_PRINT((ACPI_DB_WARN,
ACPI_DEBUG_PRINT((ACPI_DB_INFO,
"Device %02x:%02x:%02x.%02x not present in PCI namespace\n",
data->id.segment, data->id.bus,
data->id.device, data->id.function));
......
......@@ -295,15 +295,15 @@ static int acpi_driver_attach(struct acpi_driver * drv)
ACPI_FUNCTION_TRACE("acpi_driver_attach");
spin_lock(&acpi_device_lock);
list_for_each_safe(node,next,&acpi_device_list) {
struct acpi_device * dev = container_of(node,struct acpi_device,g_list);
list_for_each_safe(node, next, &acpi_device_list) {
struct acpi_device * dev = container_of(node, struct acpi_device, g_list);
if (dev->driver || !dev->status.present)
continue;
spin_unlock(&acpi_device_lock);
if (!acpi_bus_match(dev,drv)) {
if (!acpi_bus_driver_init(dev,drv)) {
if (!acpi_bus_match(dev, drv)) {
if (!acpi_bus_driver_init(dev, drv)) {
atomic_inc(&drv->references);
ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Found driver [%s] for device [%s]\n",
drv->name, dev->pnp.bus_id));
......
obj-y := poweroff.o
obj-$(CONFIG_ACPI_SLEEP) += main.o
obj-$(CONFIG_PROC_FS) += proc.o
obj-y := poweroff.o
obj-$(CONFIG_ACPI_SLEEP) += main.o
obj-$(CONFIG_ACPI_SLEEP_PROC_FS) += proc.o
EXTRA_CFLAGS += $(ACPI_CFLAGS)
......@@ -13,6 +13,7 @@
#include <linux/device.h>
#include <linux/suspend.h>
#include <acpi/acpi_bus.h>
#include <acpi/acpi_drivers.h>
#include "sleep.h"
#define _COMPONENT ACPI_SYSTEM_COMPONENT
......
......@@ -5,6 +5,7 @@
#include <asm/uaccess.h>
#include <acpi/acpi_bus.h>
#include <acpi/acpi_drivers.h>
#ifdef CONFIG_X86
#include <linux/mc146818rtc.h>
......
......@@ -44,7 +44,7 @@
#include <linux/seq_file.h>
#include <linux/version.h>
#include <acconfig.h>
#include <acpi/acconfig.h>
#define OLD_ACPI_INTERFACE (ACPI_CA_VERSION < 0x20020000)
#if OLD_ACPI_INTERFACE
......
......@@ -1538,7 +1538,7 @@ static int ns_open(struct atm_vcc *vcc, short vpi, int vci)
fill_tst(card, n, vc);
}
else /* not CBR */
else if (vcc->qos.txtp.traffic_class == ATM_UBR)
{
vc->cbr_scd = 0x00000000;
vc->scq = card->scq0;
......
......@@ -1379,10 +1379,10 @@ cciss_scsi_queue_command (Scsi_Cmnd *cmd, void (* done)(Scsi_Cmnd *))
// Get the ptr to our adapter structure (hba[i]) out of cmd->host.
// We violate cmd->host privacy here. (Is there another way?)
c = (ctlr_info_t **) &cmd->host->hostdata[0];
c = (ctlr_info_t **) &cmd->device->host->hostdata[0];
ctlr = (*c)->ctlr;
rc = lookup_scsi3addr(ctlr, cmd->channel, cmd->target, cmd->lun,
rc = lookup_scsi3addr(ctlr, cmd->device->channel, cmd->device->id, cmd->device->lun,
scsi3addr);
if (rc != 0) {
/* the scsi nexus does not match any that we presented... */
......
......@@ -682,6 +682,14 @@ static int intel_815_configure(void)
u8 temp2;
struct aper_size_info_8 *current_size;
/* attbase - aperture base */
/* the Intel 815 chipset spec. says that bits 29-31 in the
* ATTBASE register are reserved -> try not to write them */
if (agp_bridge->gatt_bus_addr & INTEL_815_ATTBASE_MASK) {
printk (KERN_EMERG "gatt bus addr too high");
return -EINVAL;
}
current_size = A_SIZE_8(agp_bridge->current_size);
/* aperture size */
......@@ -692,11 +700,6 @@ static int intel_815_configure(void)
pci_read_config_dword(agp_bridge->dev, INTEL_APBASE, &temp);
agp_bridge->gart_bus_addr = (temp & PCI_BASE_ADDRESS_MEM_MASK);
/* attbase - aperture base */
/* the Intel 815 chipset spec. says that bits 29-31 in the
* ATTBASE register are reserved -> try not to write them */
if (agp_bridge->gatt_bus_addr & INTEL_815_ATTBASE_MASK)
panic("gatt bus addr too high");
pci_read_config_dword(agp_bridge->dev, INTEL_ATTBASE, &addr);
addr &= INTEL_815_ATTBASE_MASK;
addr |= agp_bridge->gatt_bus_addr;
......
......@@ -185,22 +185,20 @@ tuner_probe(struct i2c_adapter *adap)
static struct i2c_driver
i2c_driver_tuner =
{
"sab3036", /* name */
I2C_DRIVERID_SAB3036, /* ID */
I2C_DF_NOTIFY,
tuner_probe,
tuner_detach,
tuner_command
.owner = THIS_MODULE,
.name = "sab3036",
.id = I2C_DRIVERID_SAB3036,
.flags = I2C_DF_NOTIFY,
.attach_adapter = tuner_probe,
.detach_client = tuner_detach,
.command = tuner_command
};
static struct i2c_client client_template =
{
"SAB3036", /* name */
-1,
0,
0,
NULL,
&i2c_driver_tuner
.name = "SAB3036",
.id = -1,
.driver = &i2c_driver_tuner
};
int __init
......
......@@ -50,19 +50,6 @@ config I2O_BLOCK
whenever you want). If you want to compile it as a module, say M
here and read <file:Documentation/modules.txt>.
config I2O_LAN
tristate "I2O LAN OSM"
depends on NET && I2O
help
Include support for the LAN OSM. You will also need to include
support for token ring or FDDI if you wish to use token ring or FDDI
I2O cards with this driver.
This support is also available as a module called i2o_lan ( = code
which can be inserted in and removed from the running kernel
whenever you want). If you want to compile it as a module, say M
here and read <file:Documentation/modules.txt>.
config I2O_SCSI
tristate "I2O SCSI OSM"
depends on I2O && SCSI
......
......@@ -8,6 +8,5 @@
obj-$(CONFIG_I2O_PCI) += i2o_pci.o
obj-$(CONFIG_I2O) += i2o_core.o i2o_config.o
obj-$(CONFIG_I2O_BLOCK) += i2o_block.o
obj-$(CONFIG_I2O_LAN) += i2o_lan.o
obj-$(CONFIG_I2O_SCSI) += i2o_scsi.o
obj-$(CONFIG_I2O_PROC) += i2o_proc.o
This diff is collapsed.
......@@ -224,7 +224,7 @@ static void i2o_scsi_reply(struct i2o_handler *h, struct i2o_controller *c, stru
spin_unlock_irqrestore(&retry_lock, flags);
/* Create a scsi error for this */
current_command = (Scsi_Cmnd *)m[3];
lock = current_command->host->host_lock;
lock = current_command->device->host->host_lock;
printk("Aborted %ld\n", current_command->serial_number);
spin_lock_irqsave(lock, flags);
......@@ -328,7 +328,7 @@ static void i2o_scsi_reply(struct i2o_handler *h, struct i2o_controller *c, stru
else if (current_command->request_bufflen)
pci_unmap_single(c->pdev, (dma_addr_t)((long)current_command->SCp.ptr), current_command->request_bufflen, scsi_to_pci_dma_dir(current_command->sc_data_direction));
lock = current_command->host->host_lock;
lock = current_command->device->host->host_lock;
spin_lock_irqsave(lock, flags);
current_command->scsi_done(current_command);
spin_unlock_irqrestore(lock, flags);
......@@ -606,7 +606,7 @@ static int i2o_scsi_queuecommand(Scsi_Cmnd * SCpnt, void (*done) (Scsi_Cmnd *))
* Do the incoming paperwork
*/
host = SCpnt->host;
host = SCpnt->device->host;
hostdata = (struct i2o_scsi_host *)host->hostdata;
c = hostdata->controller;
......@@ -615,13 +615,13 @@ static int i2o_scsi_queuecommand(Scsi_Cmnd * SCpnt, void (*done) (Scsi_Cmnd *))
SCpnt->scsi_done = done;
if(SCpnt->target > 15)
if(SCpnt->device->id > 15)
{
printk(KERN_ERR "i2o_scsi: Wild target %d.\n", SCpnt->target);
printk(KERN_ERR "i2o_scsi: Wild target %d.\n", SCpnt->device->id);
return -1;
}
tid = hostdata->task[SCpnt->target][SCpnt->lun];
tid = hostdata->task[SCpnt->device->id][SCpnt->device->lun];
dprintk(("qcmd: Tid = %d\n", tid));
......@@ -712,10 +712,10 @@ static int i2o_scsi_queuecommand(Scsi_Cmnd * SCpnt, void (*done) (Scsi_Cmnd *))
* with tagged queueing. We throw in the odd ordered
* tag to stop them starving themselves.
*/
if((jiffies - hostdata->tagclock[SCpnt->target][SCpnt->lun]) > (5*HZ))
if((jiffies - hostdata->tagclock[SCpnt->device->id][SCpnt->device->lun]) > (5*HZ))
{
tag=0x01800000; /* ORDERED! */
hostdata->tagclock[SCpnt->target][SCpnt->lun]=jiffies;
hostdata->tagclock[SCpnt->device->id][SCpnt->device->lun]=jiffies;
}
else
{
......@@ -916,9 +916,9 @@ int i2o_scsi_abort(Scsi_Cmnd * SCpnt)
printk(KERN_WARNING "i2o_scsi: Aborting command block.\n");
host = SCpnt->host;
host = SCpnt->device->host;
hostdata = (struct i2o_scsi_host *)host->hostdata;
tid = hostdata->task[SCpnt->target][SCpnt->lun];
tid = hostdata->task[SCpnt->device->id][SCpnt->device->lun];
if(tid==-1)
{
printk(KERN_ERR "i2o_scsi: Impossible command to abort!\n");
......@@ -982,7 +982,7 @@ static int i2o_scsi_bus_reset(Scsi_Cmnd * SCpnt)
*/
host = SCpnt->host;
host = SCpnt->device->host;
spin_unlock_irq(host->host_lock);
......
......@@ -1772,10 +1772,12 @@ vortex_timer(unsigned long data)
if (vortex_debug > 1)
printk(KERN_DEBUG "%s: Media %s has link beat, %x.\n",
dev->name, media_tbl[dev->if_port].name, media_status);
} else if (vortex_debug > 1) {
} else {
netif_carrier_off(dev);
printk(KERN_DEBUG "%s: Media %s has no link beat, %x.\n",
dev->name, media_tbl[dev->if_port].name, media_status);
if (vortex_debug > 1) {
printk(KERN_DEBUG "%s: Media %s has no link beat, %x.\n",
dev->name, media_tbl[dev->if_port].name, media_status);
}
}
break;
case XCVR_MII: case XCVR_NWAY:
......
......@@ -745,6 +745,26 @@ config VORTEX
say M here and read <file:Documentation/modules.txt> as well as
<file:Documentation/networking/net-modules.txt>.
config TYPHOON
tristate "3cr990 series \"Typhoon\" support"
depends on NET_VENDOR_3COM && PCI
---help---
This option enables driver support for the 3cr990 series of cards:
3C990-TX, 3CR990-TX-95, 3CR990-TX-97, 3CR990-FX-95, 3CR990-FX-97,
3CR990SVR, 3CR990SVR95, 3CR990SVR97, 3CR990-FX-95 Server,
3CR990-FX-97 Server, 3C990B-TX-M, 3C990BSVR
If you have a network (Ethernet) card of this type, say Y and read
the Ethernet-HOWTO, available from
<http://www.linuxdoc.org/docs.html#howto>.
This driver is also available as a module ( = code which can be
inserted in and removed from the running kernel whenever you want).
The module will be called typhoon.o. If you want to compile it as a
module, say M here and read <file:Documentation/modules.txt> as well
as <file:Documentation/networking/net-modules.txt>.
config LANCE
tristate "AMD LANCE and PCnet (AT1500 and NE2100) support"
depends on NET_ETHERNET && ISA
......@@ -1359,6 +1379,17 @@ config EEPRO100
a module, say M here and read <file:Documentation/modules.txt> as
well as <file:Documentation/networking/net-modules.txt>.
config EEPRO100_PIO
bool "Use PIO instead of MMIO" if !X86_VISWS
depends on EEPRO100
default y if X86_VISWS
help
This instructs the driver to use programmed I/O ports (PIO) instead
of PCI shared memory (MMIO). This can possibly solve some problems
in case your mainboard has memory consistency issues. If unsure,
say N.
config E100
tristate "EtherExpressPro/100 support (e100, Alternate Intel driver)"
depends on NET_PCI && PCI
......
......@@ -33,6 +33,7 @@ obj-$(CONFIG_OAKNET) += oaknet.o 8390.o
obj-$(CONFIG_DGRS) += dgrs.o
obj-$(CONFIG_RCPCI) += rcpci.o
obj-$(CONFIG_VORTEX) += 3c59x.o
obj-$(CONFIG_TYPHOON) += typhoon.o
obj-$(CONFIG_NE2K_PCI) += ne2k-pci.o 8390.o
obj-$(CONFIG_PCNET32) += pcnet32.o mii.o
obj-$(CONFIG_EEPRO100) += eepro100.o mii.o
......
......@@ -33,6 +33,7 @@ obj-$(CONFIG_SUNGEM) += crc32.o
obj-$(CONFIG_SUNLANCE) += crc32.o
obj-$(CONFIG_SUNQE) += crc32.o
obj-$(CONFIG_TULIP) += crc32.o
obj-$(CONFIG_TYPHOON) += crc32.o
obj-$(CONFIG_VIA_RHINE) += crc32.o
obj-$(CONFIG_YELLOWFIN) += crc32.o
obj-$(CONFIG_WINBOND_840) += crc32.o
......
......@@ -551,6 +551,8 @@ static struct net_device eth0_dev = {
#ifdef CONFIG_TR
/* Token-ring device probe */
extern int ibmtr_probe(struct net_device *);
extern int sk_isa_probe(struct net_device *);
extern int proteon_probe(struct net_device *);
extern int smctr_probe(struct net_device *);
static int
......@@ -560,6 +562,12 @@ trif_probe(struct net_device *dev)
#ifdef CONFIG_IBMTR
&& ibmtr_probe(dev)
#endif
#ifdef CONFIG_SKISA
&& sk_isa_probe(dev)
#endif
#ifdef CONFIG_PROTEON
&& proteon_probe(dev)
#endif
#ifdef CONFIG_SMCTR
&& smctr_probe(dev)
#endif
......
......@@ -1401,8 +1401,6 @@ static void __init bmac_probe1(struct device_node *bmac, int is_bmac_plus)
bp->queue = (struct sk_buff_head *)(bp->rx_cmds + N_RX_RING + 1);
skb_queue_head_init(bp->queue);
memset((char *) bp->tx_cmds, 0,
(N_TX_RING + N_RX_RING + 2) * sizeof(struct dbdma_cmd));
init_timer(&bp->tx_timeout);
/* bp->timeout_active = 0; */
......
......@@ -252,6 +252,7 @@
#include <linux/types.h>
#include <linux/unistd.h>
#include <linux/ctype.h>
#include <linux/mca-legacy.h>
#include <asm/uaccess.h>
#include <asm/bitops.h>
......
......@@ -120,6 +120,11 @@ static int options[] = {-1, -1, -1, -1, -1, -1, -1, -1};
#include <linux/ethtool.h>
#include <linux/mii.h>
/* enable PIO instead of MMIO, if CONFIG_EEPRO100_PIO is selected */
#ifdef CONFIG_EEPRO100_PIO
#define USE_IO 1
#endif
static int debug = -1;
#define DEBUG_DEFAULT (NETIF_MSG_DRV | \
NETIF_MSG_HW | \
......
......@@ -114,6 +114,7 @@
#include <linux/skbuff.h>
#include <linux/slab.h>
#include <linux/mca.h>
#include <linux/mca-legacy.h>
#include <linux/spinlock.h>
#include <asm/system.h>
......
......@@ -3913,9 +3913,9 @@ int iph5526_queuecommand(Scsi_Cmnd *Cmnd, void (*done) (Scsi_Cmnd *))
int int_required = 0;
u_int r_ctl = FC4_DEVICE_DATA | UNSOLICITED_COMMAND;
u_int type = TYPE_FCP | SEQUENCE_INITIATIVE;
u_int frame_class = Cmnd->target;
u_int frame_class = Cmnd->device->id;
u_short ox_id = OX_ID_FIRST_SEQUENCE;
struct Scsi_Host *host = Cmnd->host;
struct Scsi_Host *host = Cmnd->device->host;
struct iph5526_hostdata *hostdata = (struct iph5526_hostdata*)host->hostdata;
struct fc_info *fi = hostdata->fi;
struct fc_node_info *q;
......@@ -3937,9 +3937,9 @@ u_long flags;
hostdata->cmnd.fcp_cntl = FCP_CNTL_QTYPE_ORDERED;
break;
default:
if ((jiffies - hostdata->tag_ages[Cmnd->target]) > (5 * HZ)) {
if ((jiffies - hostdata->tag_ages[Cmnd->device->id]) > (5 * HZ)) {
hostdata->cmnd.fcp_cntl = FCP_CNTL_QTYPE_ORDERED;
hostdata->tag_ages[Cmnd->target] = jiffies;
hostdata->tag_ages[Cmnd->device->id] = jiffies;
}
else
hostdata->cmnd.fcp_cntl = FCP_CNTL_QTYPE_SIMPLE;
......@@ -3953,7 +3953,7 @@ u_long flags;
hostdata->cmnd.fcp_addr[3] = 0;
hostdata->cmnd.fcp_addr[2] = 0;
hostdata->cmnd.fcp_addr[1] = 0;
hostdata->cmnd.fcp_addr[0] = htons(Cmnd->lun);
hostdata->cmnd.fcp_addr[0] = htons(Cmnd->device->lun);
memcpy(&hostdata->cmnd.fcp_cdb, Cmnd->cmnd, Cmnd->cmd_len);
hostdata->cmnd.fcp_data_len = htonl(Cmnd->request_bufflen);
......@@ -3985,7 +3985,7 @@ u_long flags;
memcpy(fi->q.ptr_fcp_cmnd[fi->q.fcp_cmnd_indx], &(hostdata->cmnd), sizeof(fcp_cmd));
q = resolve_target(fi, Cmnd->target);
q = resolve_target(fi, Cmnd->device->id);
if (q == NULL) {
u_int bad_id = fi->g.my_ddaa | 0xFE;
......@@ -4022,7 +4022,7 @@ u_long flags;
int iph5526_abort(Scsi_Cmnd *Cmnd)
{
struct Scsi_Host *host = Cmnd->host;
struct Scsi_Host *host = Cmnd->device->host;
struct iph5526_hostdata *hostdata = (struct iph5526_hostdata *)host->hostdata;
struct fc_info *fi = hostdata->fi;
struct fc_node_info *q;
......@@ -4036,7 +4036,7 @@ u_long flags;
spin_lock_irqsave(&fi->fc_lock, flags);
q = resolve_target(fi, Cmnd->target);
q = resolve_target(fi, Cmnd->device->id);
if (q == NULL) {
u_int bad_id = fi->g.my_ddaa | 0xFE;
/* This should not happen as we should always be able to
......
......@@ -500,9 +500,9 @@ static inline void build_rx_desc(struct ns83820 *dev, u32 *desc, dma_addr_t link
{
desc_addr_set(desc + DESC_LINK, link);
desc_addr_set(desc + DESC_BUFPTR, buf);
desc[DESC_EXTSTS] = extsts;
desc[DESC_EXTSTS] = cpu_to_le32(extsts);
mb();
desc[DESC_CMDSTS] = cmdsts;
desc[DESC_CMDSTS] = cpu_to_le32(cmdsts);
}
#define nr_rx_empty(dev) ((NR_RX_DESC-2 + dev->rx_info.next_rx - dev->rx_info.next_empty) % NR_RX_DESC)
......
......@@ -1483,7 +1483,9 @@ static void pcnet32_load_multicast (struct net_device *dev)
crc = ether_crc_le(6, addrs);
crc = crc >> 26;
mcast_table [crc >> 4] |= 1 << (crc & 0xf);
mcast_table [crc >> 4] = le16_to_cpu(
le16_to_cpu(mcast_table [crc >> 4]) | (1 << (crc & 0xf))
);
}
return;
}
......
......@@ -339,7 +339,7 @@ do { \
intr_enable = readl(ioaddr + IntrEnable); \
intr_enable &= ~(IntrRxDone | IntrRxEmpty); \
writel(intr_enable, ioaddr + IntrEnable); \
readl(ioaddr + IntrEnable); \ /* flush PCI posting buffers */
readl(ioaddr + IntrEnable); /* flush PCI posting buffers */ \
} else { \
/* Paranoia check */ \
intr_enable = readl(ioaddr + IntrEnable); \
......
......@@ -1033,8 +1033,9 @@ static void bigmac_set_multicast(struct net_device *dev)
sbus_writel(tmp, bregs + BMAC_RXCFG);
}
static int __init bigmac_ether_init(struct net_device *dev, struct sbus_dev *qec_sdev)
static int __init bigmac_ether_init(struct sbus_dev *qec_sdev)
{
struct net_device *dev;
static int version_printed;
struct bigmac *bp;
u8 bsizes, bsizes_more;
......@@ -1049,9 +1050,6 @@ static int __init bigmac_ether_init(struct net_device *dev, struct sbus_dev *qec
if (version_printed++ == 0)
printk(KERN_INFO "%s", version);
if (!dev)
return -ENOMEM;
/* Report what we have found to the user. */
printk(KERN_INFO "%s: BigMAC 100baseT Ethernet ", dev->name);
dev->base_addr = (long) qec_sdev;
......@@ -1180,7 +1178,6 @@ static int __init bigmac_ether_init(struct net_device *dev, struct sbus_dev *qec
/* Finish net device registration. */
dev->irq = bp->bigmac_sdev->irqs[0];
dev->dma = 0;
ether_setup(dev);
/* Put us into the list of instances attached for later driver
* exit.
......@@ -1235,7 +1232,6 @@ static int __init bigmac_match(struct sbus_dev *sdev)
static int __init bigmac_probe(void)
{
struct net_device *dev = NULL;
struct sbus_bus *sbus;
struct sbus_dev *sdev = 0;
static int called;
......@@ -1249,12 +1245,9 @@ static int __init bigmac_probe(void)
for_each_sbus(sbus) {
for_each_sbusdev(sdev, sbus) {
if (cards)
dev = NULL;
if (bigmac_match(sdev)) {
cards++;
if ((v = bigmac_ether_init(dev, sdev)))
if ((v = bigmac_ether_init(sdev)))
return v;
}
}
......
......@@ -397,6 +397,10 @@ static int gem_rxmac_interrupt(struct net_device *dev, struct gem *gp, u32 gem_s
gp->dev->name, rxmac_stat);
if (rxmac_stat & MAC_RXSTAT_OFLW) {
u32 smac = readl(gp->regs + MAC_SMACHINE);
printk(KERN_ERR "%s: RX MAC fifo overflow smac[%08x].\n",
dev->name, smac);
gp->net_stats.rx_over_errors++;
gp->net_stats.rx_fifo_errors++;
......
......@@ -924,7 +924,6 @@ static int __init qec_ether_init(struct net_device *dev, struct sbus_dev *sdev)
sizeof(struct sunqe_buffers),
qe->buffers,
qe->buffers_dvma);
kfree(qe_devs[i]->priv);
}
kfree(qe_devs[i]);
}
......
......@@ -131,18 +131,33 @@ config TMSPCI
The module will be called tmspci. If you want to compile it
as a module, say M here and read <file:Documentation/modules.txt>.
config TMSISA
tristate "Generic TMS380 ISA support"
config SKISA
tristate "SysKonnect TR4/16 ISA support"
depends on TR && TMS380TR!=n && ISA
help
This tms380 module supports generic TMS380-based ISA cards.
This tms380 module supports SysKonnect TR4/16 ISA cards.
These cards are known to work:
- SysKonnect TR4/16 ISA (SK-4190)
This driver is available as a module ( = code which can be
inserted in and removed from the running kernel whenever you want).
The module will be called tmsisa. If you want to compile it
The module will be called skisa. If you want to compile it
as a module, say M here and read <file:Documentation/modules.txt>.
config PROTEON
tristate "Proteon ISA support"
depends on TR && TMS380TR!=n && ISA
help
This tms380 module supports Proteon ISA cards.
These cards are known to work:
- Proteon 1392
- Proteon 1392 plus
This driver is available as a module ( = code which can be
inserted in and removed from the running kernel whenever you want).
The module will be called proteon. If you want to compile it
as a module, say M here and read <file:Documentation/modules.txt>.
config ABYSS
......
......@@ -8,7 +8,8 @@ obj-$(CONFIG_IBMLS) += lanstreamer.o
obj-$(CONFIG_TMS380TR) += tms380tr.o
obj-$(CONFIG_ABYSS) += abyss.o
obj-$(CONFIG_MADGEMC) += madgemc.o
obj-$(CONFIG_PROTEON) += proteon.o
obj-$(CONFIG_TMSPCI) += tmspci.o
obj-$(CONFIG_TMSISA) += tmsisa.o
obj-$(CONFIG_SKISA) += skisa.o
obj-$(CONFIG_SMCTR) += smctr.o
obj-$(CONFIG_3C359) += 3c359.o
......@@ -163,7 +163,7 @@ int __init madgemc_probe(void)
if (!MCA_bus)
return -1;
while (slot != MCA_NOTFOUND) {
/*
* Currently we only support the MC16/32 (MCA ID 002d)
......@@ -180,8 +180,11 @@ int __init madgemc_probe(void)
if ((dev = init_trdev(NULL, 0))==NULL) {
printk("madgemc: unable to allocate dev space\n");
if (madgemc_card_list)
return 0;
return -1;
}
SET_MODULE_OWNER(dev);
dev->dma = 0;
/*
......@@ -193,6 +196,9 @@ int __init madgemc_probe(void)
card = kmalloc(sizeof(struct madgemc_card), GFP_KERNEL);
if (card==NULL) {
printk("madgemc: unable to allocate card struct\n");
kfree(dev); /* release_trdev? */
if (madgemc_card_list)
return 0;
return -1;
}
card->dev = dev;
......@@ -223,14 +229,14 @@ int __init madgemc_probe(void)
if (dev->irq == 0) {
printk("%s: invalid IRQ\n", dev->name);
goto getout;
goto getout1;
}
if (!request_region(dev->base_addr, MADGEMC_IO_EXTENT,
"madgemc")) {
printk(KERN_INFO "madgemc: unable to setup Smart MC in slot %d because of I/O base conflict at 0x%04lx\n", slot, dev->base_addr);
dev->base_addr += MADGEMC_SIF_OFFSET;
goto getout;
goto getout1;
}
dev->base_addr += MADGEMC_SIF_OFFSET;
......@@ -348,6 +354,14 @@ int __init madgemc_probe(void)
if (tmsdev_init(dev, ISA_MAX_ADDRESS, NULL)) {
printk("%s: unable to get memory for dev->priv.\n",
dev->name);
release_region(dev->base_addr-MADGEMC_SIF_OFFSET,
MADGEMC_IO_EXTENT);
kfree(card);
tmsdev_term(dev);
kfree(dev);
if (madgemc_card_list)
return 0;
return -1;
}
tp = (struct net_local *)dev->priv;
......@@ -376,10 +390,14 @@ int __init madgemc_probe(void)
madgemc_card_list = card;
} else {
printk("madgemc: register_trdev() returned non-zero.\n");
release_region(dev->base_addr-MADGEMC_SIF_OFFSET,
MADGEMC_IO_EXTENT);
kfree(card);
tmsdev_term(dev);
kfree(dev);
if (madgemc_card_list)
return 0;
return -1;
}
......@@ -389,6 +407,7 @@ int __init madgemc_probe(void)
getout:
release_region(dev->base_addr-MADGEMC_SIF_OFFSET,
MADGEMC_IO_EXTENT);
getout1:
kfree(card);
kfree(dev); /* release_trdev? */
slot++;
......@@ -696,7 +715,6 @@ static int madgemc_open(struct net_device *dev)
*/
madgemc_chipset_init(dev);
tms380tr_open(dev);
MOD_INC_USE_COUNT;
return 0;
}
......@@ -704,7 +722,6 @@ static int madgemc_close(struct net_device *dev)
{
tms380tr_close(dev);
madgemc_chipset_close(dev);
MOD_DEC_USE_COUNT;
return 0;
}
......
This diff is collapsed.
......@@ -3063,28 +3063,12 @@ static int smctr_load_node_addr(struct net_device *dev)
unsigned int i;
__u8 r;
/* Check if node address has been specified by user. (non-0) */
for(i = 0; ((i < 6) && (dev->dev_addr[i] == 0)); i++)
for(i = 0; i < 6; i++)
{
if(i != 6)
{
for(i = 0; i < 6; i++)
{
r = inb(ioaddr + LAR0 + i);
dev->dev_addr[i] = (char)r;
}
dev->addr_len = 6;
}
else /* Node addr. not given by user, read it from board. */
{
for(i = 0; i < 6; i++)
{
r = inb(ioaddr + LAR0 + i);
dev->dev_addr[i] = (char)r;
}
dev->addr_len = 6;
}
r = inb(ioaddr + LAR0 + i);
dev->dev_addr[i] = (char)r;
}
dev->addr_len = 6;
return (0);
}
......
This diff is collapsed.
......@@ -1135,6 +1135,7 @@ typedef struct net_local {
unsigned short (*sifreadw)(struct net_device *, unsigned short);
void (*sifwritew)(struct net_device *, unsigned short, unsigned short);
spinlock_t lock; /* SMP protection */
void *tmspriv;
} NET_LOCAL;
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -697,7 +697,7 @@ static int NCR53c406a_queue(Scsi_Cmnd * SCpnt, void (*done) (Scsi_Cmnd *))
/* We are locked here already by the mid layer */
REG0;
outb(SCpnt->target, DEST_ID); /* set destination */
outb(SCpnt->device->id, DEST_ID); /* set destination */
outb(FLUSH_FIFO, CMD_REG); /* reset the fifos */
for (i = 0; i < SCpnt->cmd_len; i++) {
......
......@@ -315,8 +315,8 @@ static int aha1740_queuecommand(Scsi_Cmnd * SCpnt, void (*done)(Scsi_Cmnd *))
{
unchar direction;
unchar *cmd = (unchar *) SCpnt->cmnd;
unchar target = SCpnt->target;
struct aha1740_hostdata *host = HOSTDATA(SCpnt->host);
unchar target = SCpnt->device->id;
struct aha1740_hostdata *host = HOSTDATA(SCpnt->device->host);
unsigned long flags;
void *buff = SCpnt->request_buffer;
int bufflen = SCpnt->request_bufflen;
......@@ -416,7 +416,7 @@ static int aha1740_queuecommand(Scsi_Cmnd * SCpnt, void (*done)(Scsi_Cmnd *))
host->ecb[ecbno].datalen = bufflen;
host->ecb[ecbno].dataptr = isa_virt_to_bus(buff);
}
host->ecb[ecbno].lun = SCpnt->lun;
host->ecb[ecbno].lun = SCpnt->device->lun;
host->ecb[ecbno].ses = 1; /* Suppress underrun errors */
host->ecb[ecbno].dir = direction;
host->ecb[ecbno].ars = 1; /* Yes, get the sense on an error */
......@@ -449,7 +449,7 @@ static int aha1740_queuecommand(Scsi_Cmnd * SCpnt, void (*done)(Scsi_Cmnd *))
#define LOOPCNT_WARN 10 /* excessive mbxout wait -> syslog-msg */
#define LOOPCNT_MAX 1000000 /* mbxout deadlock -> panic() after ~ 2 sec. */
int loopcnt;
unsigned int base = SCpnt->host->io_port;
unsigned int base = SCpnt->device->host->io_port;
DEB(printk("aha1740[%d] critical section\n",ecbno));
spin_lock_irqsave(&aha1740_lock, flags);
......
......@@ -87,6 +87,7 @@
#include <linux/delay.h>
#include <linux/mca.h>
#include <linux/spinlock.h>
#include <linux/mca-legacy.h>
#include <asm/io.h>
#include <asm/system.h>
......@@ -732,7 +733,7 @@ static void fd_mcs_intr(int irq, void *dev_id, struct pt_regs *regs)
outb(0x40 | FIFO_COUNT, Interrupt_Cntl_port);
outb(0x82, SCSI_Cntl_port); /* Bus Enable + Select */
outb(adapter_mask | (1 << current_SC->target), SCSI_Data_NoACK_port);
outb(adapter_mask | (1 << current_SC->device->id), SCSI_Data_NoACK_port);
/* Stop arbitration and enable parity */
outb(0x10 | PARITY_MASK, TMC_Cntl_port);
......@@ -744,7 +745,7 @@ static void fd_mcs_intr(int irq, void *dev_id, struct pt_regs *regs)
status = inb(SCSI_Status_port);
if (!(status & 0x01)) {
/* Try again, for slow devices */
if (fd_mcs_select(shpnt, current_SC->target)) {
if (fd_mcs_select(shpnt, current_SC->device->id)) {
#if EVERY_ACCESS
printk(" SFAIL ");
#endif
......@@ -802,7 +803,7 @@ static void fd_mcs_intr(int irq, void *dev_id, struct pt_regs *regs)
#endif
#if ERRORS_ONLY
if (current_SC->SCp.Status && current_SC->SCp.Status != 2 && current_SC->SCp.Status != 8) {
printk("ERROR fd_mcs: target = %d, command = %x, status = %x\n", current_SC->target, current_SC->cmnd[0], current_SC->SCp.Status);
printk("ERROR fd_mcs: target = %d, command = %x, status = %x\n", current_SC->device->id, current_SC->cmnd[0], current_SC->SCp.Status);
}
#endif
break;
......@@ -1150,7 +1151,7 @@ static int fd_mcs_release(struct Scsi_Host *shpnt)
static int fd_mcs_queue(Scsi_Cmnd * SCpnt, void (*done) (Scsi_Cmnd *))
{
struct Scsi_Host *shpnt = SCpnt->host;
struct Scsi_Host *shpnt = SCpnt->device->host;
if (in_command) {
panic("fd_mcs: fd_mcs_queue() NOT REENTRANT!\n");
......@@ -1243,7 +1244,7 @@ static void fd_mcs_print_info(Scsi_Cmnd * SCpnt)
break;
}
printk("(%d), target = %d cmnd = 0x%02x pieces = %d size = %u\n", SCpnt->SCp.phase, SCpnt->target, *(unsigned char *) SCpnt->cmnd, SCpnt->use_sg, SCpnt->request_bufflen);
printk("(%d), target = %d cmnd = 0x%02x pieces = %d size = %u\n", SCpnt->SCp.phase, SCpnt->device->id, *(unsigned char *) SCpnt->cmnd, SCpnt->use_sg, SCpnt->request_bufflen);
printk("sent_command = %d, have_data_in = %d, timeout = %d\n", SCpnt->SCp.sent_command, SCpnt->SCp.have_data_in, SCpnt->timeout);
#if DEBUG_RACE
printk("in_interrupt_flag = %d\n", in_interrupt_flag);
......@@ -1286,7 +1287,7 @@ static void fd_mcs_print_info(Scsi_Cmnd * SCpnt)
static int fd_mcs_abort(Scsi_Cmnd * SCpnt)
{
struct Scsi_Host *shpnt = SCpnt->host;
struct Scsi_Host *shpnt = SCpnt->device->host;
unsigned long flags;
#if EVERY_ACCESS || ERRORS_ONLY || DEBUG_ABORT
......@@ -1331,7 +1332,7 @@ static int fd_mcs_device_reset(Scsi_Cmnd * SCpnt)
}
static int fd_mcs_bus_reset(Scsi_Cmnd * SCpnt) {
struct Scsi_Host *shpnt = SCpnt->host;
struct Scsi_Host *shpnt = SCpnt->device->host;
#if DEBUG_RESET
static int called_once = 0;
......
......@@ -39,6 +39,7 @@
#include <linux/string.h>
#include <linux/spinlock.h>
#include <linux/init.h>
#include <linux/mca-legacy.h>
#include <asm/system.h>
#include <asm/io.h>
......@@ -668,8 +669,8 @@ static void interrupt_handler(int irq, void *dev_id, struct pt_regs *regs)
ld(ihost_index)[ldn].cmd = NULL;
#ifdef IM_DEBUG_TIMEOUT
if (cmd) {
if ((cmd->target == TIMEOUT_PUN) && (cmd->lun == TIMEOUT_LUN)) {
printk("IBM MCA SCSI: Ignoring interrupt from pun=%x, lun=%x.\n", cmd->target, cmd->lun);
if ((cmd->target == TIMEOUT_PUN) && (cmd->device->lun == TIMEOUT_LUN)) {
printk("IBM MCA SCSI: Ignoring interrupt from pun=%x, lun=%x.\n", cmd->target, cmd->device->lun);
return;
}
}
......@@ -1824,7 +1825,7 @@ static int ibmmca_queuecommand(Scsi_Cmnd * cmd, void (*done) (Scsi_Cmnd *))
int i;
struct scatterlist *sl;
shpnt = cmd->host;
shpnt = cmd->device->host;
/* search for the right hostadapter */
for (host_index = 0; hosts[host_index] && hosts[host_index]->host_no != shpnt->host_no; host_index++);
......@@ -1836,16 +1837,16 @@ static int ibmmca_queuecommand(Scsi_Cmnd * cmd, void (*done) (Scsi_Cmnd *))
}
max_pun = subsystem_maxid(host_index);
if (ibm_ansi_order) {
target = max_pun - 1 - cmd->target;
if ((target <= subsystem_pun(host_index)) && (cmd->target <= subsystem_pun(host_index)))
target = max_pun - 1 - cmd->device->id;
if ((target <= subsystem_pun(host_index)) && (cmd->device->id <= subsystem_pun(host_index)))
target--;
else if ((target >= subsystem_pun(host_index)) && (cmd->target >= subsystem_pun(host_index)))
else if ((target >= subsystem_pun(host_index)) && (cmd->device->id >= subsystem_pun(host_index)))
target++;
} else
target = cmd->target;
target = cmd->device->id;
/* if (target,lun) is NO LUN or not existing at all, return error */
if ((get_scsi(host_index)[target][cmd->lun] == TYPE_NO_LUN) || (get_scsi(host_index)[target][cmd->lun] == TYPE_NO_DEVICE)) {
if ((get_scsi(host_index)[target][cmd->device->lun] == TYPE_NO_LUN) || (get_scsi(host_index)[target][cmd->device->lun] == TYPE_NO_DEVICE)) {
cmd->result = DID_NO_CONNECT << 16;
if (done)
done(cmd);
......@@ -1853,7 +1854,7 @@ static int ibmmca_queuecommand(Scsi_Cmnd * cmd, void (*done) (Scsi_Cmnd *))
}
/*if (target,lun) unassigned, do further checks... */
ldn = get_ldn(host_index)[target][cmd->lun];
ldn = get_ldn(host_index)[target][cmd->device->lun];
if (ldn >= MAX_LOG_DEV) { /* on invalid ldn do special stuff */
if (ldn > MAX_LOG_DEV) { /* dynamical remapping if ldn unassigned */
current_ldn = next_ldn(host_index); /* stop-value for one circle */
......@@ -1864,7 +1865,7 @@ static int ibmmca_queuecommand(Scsi_Cmnd * cmd, void (*done) (Scsi_Cmnd *))
next_ldn(host_index) = 7;
if (current_ldn == next_ldn(host_index)) { /* One circle done ? */
/* no non-processing ldn found */
printk("IBM MCA SCSI: Cannot assign SCSI-device dynamically!\n" " On ldn 7-14 SCSI-commands everywhere in progress.\n" " Reporting DID_NO_CONNECT for device (%d,%d).\n", target, cmd->lun);
printk("IBM MCA SCSI: Cannot assign SCSI-device dynamically!\n" " On ldn 7-14 SCSI-commands everywhere in progress.\n" " Reporting DID_NO_CONNECT for device (%d,%d).\n", target, cmd->device->lun);
cmd->result = DID_NO_CONNECT << 16; /* return no connect */
if (done)
done(cmd);
......@@ -1884,26 +1885,26 @@ static int ibmmca_queuecommand(Scsi_Cmnd * cmd, void (*done) (Scsi_Cmnd *))
/* set reduced interrupt_handler-mode for checking */
local_checking_phase_flag(host_index) = 1;
/* map found ldn to pun,lun */
get_ldn(host_index)[target][cmd->lun] = next_ldn(host_index);
get_ldn(host_index)[target][cmd->device->lun] = next_ldn(host_index);
/* change ldn to the right value, that is now next_ldn */
ldn = next_ldn(host_index);
/* unassign all ldns (pun,lun,ldn does not matter for remove) */
immediate_assign(host_index, 0, 0, 0, REMOVE_LDN);
/* set only LDN for remapped device */
immediate_assign(host_index, target, cmd->lun, ldn, SET_LDN);
immediate_assign(host_index, target, cmd->device->lun, ldn, SET_LDN);
/* get device information for ld[ldn] */
if (device_exists(host_index, ldn, &ld(host_index)[ldn].block_length, &ld(host_index)[ldn].device_type)) {
ld(host_index)[ldn].cmd = NULL; /* To prevent panic set 0, because
devices that were not assigned,
should have nothing in progress. */
get_scsi(host_index)[target][cmd->lun] = ld(host_index)[ldn].device_type;
get_scsi(host_index)[target][cmd->device->lun] = ld(host_index)[ldn].device_type;
/* increase assignment counters for statistics in /proc */
IBM_DS(host_index).dynamical_assignments++;
IBM_DS(host_index).ldn_assignments[ldn]++;
} else
/* panic here, because a device, found at boottime has
vanished */
panic("IBM MCA SCSI: ldn=0x%x, SCSI-device on (%d,%d) vanished!\n", ldn, target, cmd->lun);
panic("IBM MCA SCSI: ldn=0x%x, SCSI-device on (%d,%d) vanished!\n", ldn, target, cmd->device->lun);
/* unassign again all ldns (pun,lun,ldn does not matter for remove) */
immediate_assign(host_index, 0, 0, 0, REMOVE_LDN);
/* remap all ldns, as written in the pun/lun table */
......@@ -1919,7 +1920,7 @@ static int ibmmca_queuecommand(Scsi_Cmnd * cmd, void (*done) (Scsi_Cmnd *))
local_checking_phase_flag(host_index) = 0;
#ifdef IM_DEBUG_PROBE
/* Information on syslog terminal */
printk("IBM MCA SCSI: ldn=0x%x dynamically reassigned to (%d,%d).\n", ldn, target, cmd->lun);
printk("IBM MCA SCSI: ldn=0x%x dynamically reassigned to (%d,%d).\n", ldn, target, cmd->device->lun);
#endif
/* increase next_ldn for next dynamical assignment */
next_ldn(host_index)++;
......@@ -2141,7 +2142,7 @@ static int ibmmca_abort(Scsi_Cmnd * cmd)
printk("IBM MCA SCSI: Abort subroutine called...\n");
#endif
shpnt = cmd->host;
shpnt = cmd->device->host;
/* search for the right hostadapter */
for (host_index = 0; hosts[host_index] && hosts[host_index]->host_no != shpnt->host_no; host_index++);
......@@ -2149,7 +2150,7 @@ static int ibmmca_abort(Scsi_Cmnd * cmd)
cmd->result = DID_NO_CONNECT << 16;
if (cmd->scsi_done)
(cmd->scsi_done) (cmd);
shpnt = cmd->host;
shpnt = cmd->device->host;
#ifdef IM_DEBUG_PROBE
printk(KERN_DEBUG "IBM MCA SCSI: Abort adapter selection failed!\n");
#endif
......@@ -2157,17 +2158,17 @@ static int ibmmca_abort(Scsi_Cmnd * cmd)
}
max_pun = subsystem_maxid(host_index);
if (ibm_ansi_order) {
target = max_pun - 1 - cmd->target;
if ((target <= subsystem_pun(host_index)) && (cmd->target <= subsystem_pun(host_index)))
target = max_pun - 1 - cmd->device->id;
if ((target <= subsystem_pun(host_index)) && (cmd->device->id <= subsystem_pun(host_index)))
target--;
else if ((target >= subsystem_pun(host_index)) && (cmd->target >= subsystem_pun(host_index)))
else if ((target >= subsystem_pun(host_index)) && (cmd->device->id >= subsystem_pun(host_index)))
target++;
} else
target = cmd->target;
target = cmd->device->id;
/* get logical device number, and disable system interrupts */
printk(KERN_WARNING "IBM MCA SCSI: Sending abort to device pun=%d, lun=%d.\n", target, cmd->lun);
ldn = get_ldn(host_index)[target][cmd->lun];
printk(KERN_WARNING "IBM MCA SCSI: Sending abort to device pun=%d, lun=%d.\n", target, cmd->device->lun);
ldn = get_ldn(host_index)[target][cmd->device->lun];
/*if cmd for this ldn has already finished, no need to abort */
if (!ld(host_index)[ldn].cmd) {
......@@ -2242,7 +2243,7 @@ static int ibmmca_host_reset(Scsi_Cmnd * cmd)
BUG();
ticks = IM_RESET_DELAY * HZ;
shpnt = cmd->host;
shpnt = cmd->device->host;
/* search for the right hostadapter */
for (host_index = 0; hosts[host_index] && hosts[host_index]->host_no != shpnt->host_no; host_index++);
......
......@@ -148,7 +148,7 @@ int ppa_detect(Scsi_Host_Template * host)
"pardevice is owning the port for too longtime!\n",
i);
parport_unregister_device(ppa_hosts[i].dev);
spin_lock_irq(ppa_hosts[i].cur_cmd->host->host_lock);
spin_lock_irq(ppa_hosts[i].cur_cmd->device->host->host_lock);
return 0;
}
}
......@@ -635,7 +635,7 @@ static int ppa_init(int host_no)
static inline int ppa_send_command(Scsi_Cmnd * cmd)
{
int host_no = cmd->host->unique_id;
int host_no = cmd->device->host->unique_id;
int k;
w_ctr(PPA_BASE(host_no), 0x0c);
......@@ -661,7 +661,7 @@ static int ppa_completion(Scsi_Cmnd * cmd)
* 0 Told to schedule
* 1 Finished data transfer
*/
int host_no = cmd->host->unique_id;
int host_no = cmd->device->host->unique_id;
unsigned short ppb = PPA_BASE(host_no);
unsigned long start_jiffies = jiffies;
......@@ -752,7 +752,7 @@ static int ppa_completion(Scsi_Cmnd * cmd)
int ppa_command(Scsi_Cmnd * cmd)
{
static int first_pass = 1;
int host_no = cmd->host->unique_id;
int host_no = cmd->device->host->unique_id;
if (first_pass) {
printk("ppa: using non-queuing interface\n");
......@@ -774,7 +774,7 @@ int ppa_command(Scsi_Cmnd * cmd)
schedule();
if (cmd->SCp.phase) /* Only disconnect if we have connected */
ppa_disconnect(cmd->host->unique_id);
ppa_disconnect(cmd->device->host->unique_id);
ppa_pb_release(host_no);
ppa_hosts[host_no].cur_cmd = 0;
......@@ -807,7 +807,7 @@ static void ppa_interrupt(void *data)
case DID_OK:
break;
case DID_NO_CONNECT:
printk("ppa: no device at SCSI ID %i\n", cmd->target);
printk("ppa: no device at SCSI ID %i\n", cmd->device->target);
break;
case DID_BUS_BUSY:
printk("ppa: BUS BUSY - EPP timeout detected\n");
......@@ -836,21 +836,21 @@ static void ppa_interrupt(void *data)
#endif
if (cmd->SCp.phase > 1)
ppa_disconnect(cmd->host->unique_id);
ppa_disconnect(cmd->device->host->unique_id);
if (cmd->SCp.phase > 0)
ppa_pb_release(cmd->host->unique_id);
ppa_pb_release(cmd->device->host->unique_id);
tmp->cur_cmd = 0;
spin_lock_irqsave(cmd->host->host_lock, flags);
spin_lock_irqsave(cmd->device->host->host_lock, flags);
cmd->scsi_done(cmd);
spin_unlock_irqrestore(cmd->host->host_lock, flags);
spin_unlock_irqrestore(cmd->device->host->host_lock, flags);
return;
}
static int ppa_engine(ppa_struct * tmp, Scsi_Cmnd * cmd)
{
int host_no = cmd->host->unique_id;
int host_no = cmd->device->host->unique_id;
unsigned short ppb = PPA_BASE(host_no);
unsigned char l = 0, h = 0;
int retv;
......@@ -900,7 +900,7 @@ static int ppa_engine(ppa_struct * tmp, Scsi_Cmnd * cmd)
}
case 2: /* Phase 2 - We are now talking to the scsi bus */
if (!ppa_select(host_no, cmd->target)) {
if (!ppa_select(host_no, cmd->device->id)) {
ppa_fail(host_no, DID_NO_CONNECT);
return 0;
}
......@@ -966,7 +966,7 @@ static int ppa_engine(ppa_struct * tmp, Scsi_Cmnd * cmd)
int ppa_queuecommand(Scsi_Cmnd * cmd, void (*done) (Scsi_Cmnd *))
{
int host_no = cmd->host->unique_id;
int host_no = cmd->device->host->unique_id;
if (ppa_hosts[host_no].cur_cmd) {
printk("PPA: bug in ppa_queuecommand\n");
......@@ -1011,7 +1011,7 @@ int ppa_biosparam(struct scsi_device *sdev, struct block_device *dev,
int ppa_abort(Scsi_Cmnd * cmd)
{
int host_no = cmd->host->unique_id;
int host_no = cmd->device->host->unique_id;
/*
* There is no method for aborting commands since Iomega
* have tied the SCSI_MESSAGE line high in the interface
......@@ -1039,7 +1039,7 @@ static void ppa_reset_pulse(unsigned int base)
int ppa_reset(Scsi_Cmnd * cmd)
{
int host_no = cmd->host->unique_id;
int host_no = cmd->device->host->unique_id;
if (cmd->SCp.phase)
ppa_disconnect(host_no);
......
......@@ -683,8 +683,8 @@ static int seagate_st0x_queue_command (Scsi_Cmnd * SCpnt, void (*done) (Scsi_Cmn
DANY ("seagate: que_command");
done_fn = done;
current_target = SCpnt->target;
current_lun = SCpnt->lun;
current_target = SCpnt->device->id;
current_lun = SCpnt->device->lun;
current_cmnd = SCpnt->cmnd;
current_data = (unsigned char *) SCpnt->request_buffer;
current_bufflen = SCpnt->request_bufflen;
......@@ -713,7 +713,7 @@ static int seagate_st0x_queue_command (Scsi_Cmnd * SCpnt, void (*done) (Scsi_Cmn
#endif /* LINKED */
reconnect = CAN_RECONNECT;
result = internal_command(SCint->target, SCint->lun, SCint->cmnd,
result = internal_command(SCint->device->id, SCint->device->lun, SCint->cmnd,
SCint->request_buffer, SCint->request_bufflen, reconnect);
if (msg_byte(result) == DISCONNECT)
break;
......@@ -729,7 +729,7 @@ static int seagate_st0x_queue_command (Scsi_Cmnd * SCpnt, void (*done) (Scsi_Cmn
static int seagate_st0x_command(Scsi_Cmnd * SCpnt)
{
return internal_command (SCpnt->target, SCpnt->lun, SCpnt->cmnd,
return internal_command (SCpnt->device->id, SCpnt->device->lun, SCpnt->cmnd,
SCpnt->request_buffer, SCpnt->request_bufflen,
(int) NO_RECONNECT);
}
......
/*
/*
* sym53c416.c
* Low-level SCSI driver for sym53c416 chip.
* Copyright (C) 1998 Lieven Willems (lw_linux@hotmail.com)
......@@ -763,7 +763,7 @@ int sym53c416_queuecommand(Scsi_Cmnd *SCpnt, void (*done)(Scsi_Cmnd *))
int i;
/* Store base register as we can have more than one controller in the system */
base = SCpnt->host->io_port;
base = SCpnt->device->host->io_port;
current_command = SCpnt; /* set current command */
current_command->scsi_done = done; /* set ptr to done function */
current_command->SCp.phase = command_ph; /* currect phase is the command phase */
......@@ -771,7 +771,7 @@ int sym53c416_queuecommand(Scsi_Cmnd *SCpnt, void (*done)(Scsi_Cmnd *))
current_command->SCp.Message = 0;
spin_lock_irqsave(&sym53c416_lock, flags);
outb(SCpnt->target, base + DEST_BUS_ID); /* Set scsi id target */
outb(SCpnt->device->id, base + DEST_BUS_ID); /* Set scsi id target */
outb(FLUSH_FIFO, base + COMMAND_REG); /* Flush SCSI and PIO FIFO's */
/* Write SCSI command into the SCSI fifo */
for(i = 0; i < SCpnt->cmd_len; i++)
......@@ -819,7 +819,7 @@ static int sym53c416_host_reset(Scsi_Cmnd *SCpnt)
int i;
/* printk("sym53c416_reset\n"); */
base = SCpnt->host->io_port;
base = SCpnt->device->host->io_port;
/* search scsi_id - fixme, we shouldnt need to iterate for this! */
for(i = 0; i < host_index && scsi_id != -1; i++)
if(hosts[i].base == base)
......
......@@ -504,7 +504,7 @@ static int ultrastor_14f_detect(Scsi_Host_Template * tpnt)
* Brrr, &config.mscp[0].SCint->host) it is something magical....
* XXX and FIXME
*/
if (request_irq(config.interrupt, do_ultrastor_interrupt, 0, "Ultrastor", &config.mscp[0].SCint->host)) {
if (request_irq(config.interrupt, do_ultrastor_interrupt, 0, "Ultrastor", &config.mscp[0].SCint->device->host)) {
printk("Unable to allocate IRQ%u for UltraStor controller.\n",
config.interrupt);
goto out_release_port;
......@@ -714,9 +714,9 @@ static int ultrastor_queuecommand(Scsi_Cmnd *SCpnt, void (*done)(Scsi_Cmnd *))
??? Which other device types should never use the cache? */
my_mscp->ca = SCpnt->device->type != TYPE_TAPE;
my_mscp->target_id = SCpnt->target;
my_mscp->target_id = SCpnt->device->id;
my_mscp->ch_no = 0;
my_mscp->lun = SCpnt->lun;
my_mscp->lun = SCpnt->device->lun;
if (SCpnt->use_sg) {
/* Set scatter/gather flag in SCSI command packet */
my_mscp->sg = TRUE;
......@@ -832,7 +832,7 @@ static int ultrastor_abort(Scsi_Cmnd *SCpnt)
unsigned char old_aborted;
unsigned long flags;
void (*done)(Scsi_Cmnd *);
struct Scsi_Host *host = SCpnt->host;
struct Scsi_Host *host = SCpnt->device->host;
if(config.slot)
return FAILED; /* Do not attempt an abort for the 24f */
......@@ -954,7 +954,7 @@ static int ultrastor_host_reset(Scsi_Cmnd * SCpnt)
{
unsigned long flags;
int i;
struct Scsi_Host *host = SCpnt->host;
struct Scsi_Host *host = SCpnt->device->host;
#if (ULTRASTOR_DEBUG & UD_RESET)
printk("US14F: reset: called\n");
......
......@@ -1122,13 +1122,13 @@ static int wd7000_queuecommand(Scsi_Cmnd * SCpnt, void (*done) (Scsi_Cmnd *))
register unchar *cdb = (unchar *) SCpnt->cmnd;
register unchar idlun;
register short cdblen;
Adapter *host = (Adapter *) SCpnt->host->hostdata;
Adapter *host = (Adapter *) SCpnt->device->host->hostdata;
cdblen = SCpnt->cmd_len;
idlun = ((SCpnt->target << 5) & 0xe0) | (SCpnt->lun & 7);
idlun = ((SCpnt->device->id << 5) & 0xe0) | (SCpnt->device->lun & 7);
SCpnt->scsi_done = done;
SCpnt->SCp.phase = 1;
scb = alloc_scbs(SCpnt->host, 1);
scb = alloc_scbs(SCpnt->device->host, 1);
scb->idlun = idlun;
memcpy(scb->cdb, cdb, cdblen);
scb->direc = 0x40; /* Disable direction check */
......@@ -1141,7 +1141,7 @@ static int wd7000_queuecommand(Scsi_Cmnd * SCpnt, void (*done) (Scsi_Cmnd *))
struct scatterlist *sg = (struct scatterlist *) SCpnt->request_buffer;
unsigned i;
if (SCpnt->host->sg_tablesize == SG_NONE) {
if (SCpnt->device->host->sg_tablesize == SG_NONE) {
panic("wd7000_queuecommand: scatter/gather not supported.\n");
}
dprintk("Using scatter/gather with %d elements.\n", SCpnt->use_sg);
......@@ -1646,7 +1646,7 @@ static int wd7000_detect(Scsi_Host_Template * tpnt)
*/
static int wd7000_abort(Scsi_Cmnd * SCpnt)
{
Adapter *host = (Adapter *) SCpnt->host->hostdata;
Adapter *host = (Adapter *) SCpnt->device->host->hostdata;
if (inb(host->iobase + ASC_STAT) & INT_IM) {
printk("wd7000_abort: lost interrupt\n");
......@@ -1677,7 +1677,7 @@ static int wd7000_device_reset(Scsi_Cmnd * SCpnt)
static int wd7000_host_reset(Scsi_Cmnd * SCpnt)
{
Adapter *host = (Adapter *) SCpnt->host->hostdata;
Adapter *host = (Adapter *) SCpnt->device->host->hostdata;
if (wd7000_adapter_reset(host) < 0)
return FAILED;
......
......@@ -93,6 +93,7 @@ struct rpc_program nfs_program = {
.nrvers = sizeof(nfs_version) / sizeof(nfs_version[0]),
.version = nfs_version,
.stats = &nfs_rpcstat,
.pipe_dir_name = "/nfs",
};
static inline unsigned long
......
......@@ -118,8 +118,8 @@ int reiserfs_resize (struct super_block * s, unsigned long block_count_new)
memset(bitmap[i].bh->b_data, 0, sb_blocksize(sb));
reiserfs_test_and_set_le_bit(0, bitmap[i].bh->b_data);
mark_buffer_dirty(bitmap[i].bh) ;
set_buffer_uptodate(bitmap[i].bh);
mark_buffer_dirty(bitmap[i].bh) ;
sync_dirty_buffer(bitmap[i].bh);
// update bitmap_info stuff
bitmap[i].first_zero_hint=1;
......
......@@ -28,6 +28,7 @@
#define ACPI_OS_NAME "Linux"
#define ACPI_USE_SYSTEM_CLIBRARY
#define ACPI_USE_DO_WHILE_0
#ifdef __KERNEL__
......
......@@ -7,6 +7,8 @@
#ifndef _LINUX_MCA_LEGACY_H
#define _LINUX_MCA_LEGACY_H
#warning "MCA legacy - please move your driver to the new sysfs api"
/* MCA_NOTFOUND is an error condition. The other two indicate
* motherboard POS registers contain the adapter. They might be
* returned by the mca_find_adapter() function, and can be used as
......
......@@ -893,6 +893,14 @@
#define PCI_DEVICE_ID_3COM_3C905TX 0x9050
#define PCI_DEVICE_ID_3COM_3C905T4 0x9051
#define PCI_DEVICE_ID_3COM_3C905B_TX 0x9055
#define PCI_DEVICE_ID_3COM_3CR990 0x9900
#define PCI_DEVICE_ID_3COM_3CR990_TX_95 0x9902
#define PCI_DEVICE_ID_3COM_3CR990_TX_97 0x9903
#define PCI_DEVICE_ID_3COM_3CR990B 0x9904
#define PCI_DEVICE_ID_3COM_3CR990_FX 0x9905
#define PCI_DEVICE_ID_3COM_3CR990SVR95 0x9908
#define PCI_DEVICE_ID_3COM_3CR990SVR97 0x9909
#define PCI_DEVICE_ID_3COM_3CR990SVR 0x990a
#define PCI_VENDOR_ID_SMC 0x10b8
#define PCI_DEVICE_ID_SMC_EPIC100 0x0005
......
......@@ -79,6 +79,7 @@ struct rpc_program {
unsigned int nrvers; /* number of versions */
struct rpc_version ** version; /* version array */
struct rpc_stat * stats; /* statistics */
char * pipe_dir_name; /* path to rpc_pipefs dir */
};
struct rpc_version {
......
......@@ -351,4 +351,9 @@ void ptrace_notify(int exit_code)
set_current_state(TASK_STOPPED);
notify_parent(current, SIGCHLD);
schedule();
/*
* Signals sent while we were stopped might set TIF_SIGPENDING.
*/
recalc_sigpending();
}
......@@ -63,6 +63,32 @@ static u32 * call_header(struct rpc_task *task);
static u32 * call_verify(struct rpc_task *task);
static int
rpc_setup_pipedir(struct rpc_clnt *clnt, char *dir_name)
{
static uint32_t clntid;
int maxlen = sizeof(clnt->cl_pathname);
int error;
if (dir_name == NULL)
return 0;
for (;;) {
snprintf(clnt->cl_pathname, sizeof(clnt->cl_pathname),
"%s/clnt%x", dir_name,
(unsigned int)clntid++);
clnt->cl_pathname[sizeof(clnt->cl_pathname) - 1] = '\0';
clnt->cl_dentry = rpc_mkdir(clnt->cl_pathname, clnt);
if (!IS_ERR(clnt->cl_dentry))
return 0;
error = PTR_ERR(clnt->cl_dentry);
if (error != -EEXIST) {
printk(KERN_INFO "RPC: Couldn't create pipefs entry %s, error %d\n",
clnt->cl_pathname, error);
return error;
}
}
}
/*
* Create an RPC client
* FIXME: This should also take a flags argument (as in task->tk_flags).
......@@ -109,14 +135,9 @@ rpc_create_client(struct rpc_xprt *xprt, char *servname,
rpc_init_rtt(&clnt->cl_rtt, xprt->timeout.to_initval);
snprintf(clnt->cl_pathname, sizeof(clnt->cl_pathname),
"/%s/clnt%p", clnt->cl_protname, clnt);
clnt->cl_dentry = rpc_mkdir(clnt->cl_pathname, clnt);
if (IS_ERR(clnt->cl_dentry)) {
printk(KERN_INFO "RPC: Couldn't create pipefs entry %s\n",
clnt->cl_pathname);
if (rpc_setup_pipedir(clnt, program->pipe_dir_name) < 0)
goto out_no_path;
}
if (!rpcauth_create(flavor, clnt)) {
printk(KERN_INFO "RPC: Couldn't create auth handle (flavor %u)\n",
flavor);
......
......@@ -476,15 +476,16 @@ rpc_get_inode(struct super_block *sb, int mode)
* FIXME: This probably has races.
*/
static void
rpc_depopulate(struct dentry *dir)
rpc_depopulate(struct dentry *parent)
{
struct inode *dir = parent->d_inode;
LIST_HEAD(head);
struct list_head *pos, *next;
struct dentry *dentry;
down(&dir->d_inode->i_sem);
down(&dir->i_sem);
spin_lock(&dcache_lock);
list_for_each_safe(pos, next, &dir->d_subdirs) {
list_for_each_safe(pos, next, &parent->d_subdirs) {
dentry = list_entry(pos, struct dentry, d_child);
if (!d_unhashed(dentry)) {
dget_locked(dentry);
......@@ -499,32 +500,34 @@ rpc_depopulate(struct dentry *dir)
__d_drop(dentry);
if (dentry->d_inode) {
rpc_inode_setowner(dentry->d_inode, NULL);
simple_unlink(dir->d_inode, dentry);
simple_unlink(dir, dentry);
}
dput(dentry);
}
up(&dir->d_inode->i_sem);
up(&dir->i_sem);
}
static int
rpc_populate(struct dentry *dir,
rpc_populate(struct dentry *parent,
struct rpc_filelist *files,
int start, int eof)
{
void *private = RPC_I(dir->d_inode)->private;
struct inode *inode, *dir = parent->d_inode;
void *private = RPC_I(dir)->private;
struct qstr name;
struct dentry *dentry;
struct inode *inode;
int mode, i;
down(&dir->i_sem);
for (i = start; i < eof; i++) {
name.name = files[i].name;
name.len = strlen(name.name);
name.hash = full_name_hash(name.name, name.len);
dentry = d_alloc(dir, &name);
dentry = d_alloc(parent, &name);
if (!dentry)
goto out_bad;
mode = files[i].mode;
inode = rpc_get_inode(dir->d_inode->i_sb, mode);
inode = rpc_get_inode(dir->i_sb, mode);
if (!inode) {
dput(dentry);
goto out_bad;
......@@ -535,13 +538,15 @@ rpc_populate(struct dentry *dir,
if (private)
rpc_inode_setowner(inode, private);
if (S_ISDIR(mode))
dir->d_inode->i_nlink++;
dir->i_nlink++;
d_add(dentry, inode);
}
up(&dir->i_sem);
return 0;
out_bad:
up(&dir->i_sem);
printk(KERN_WARNING "%s: %s failed to populate directory %s\n",
__FILE__, __FUNCTION__, dir->d_name.name);
__FILE__, __FUNCTION__, parent->d_name.name);
return -ENOMEM;
}
......@@ -570,6 +575,7 @@ __rpc_rmdir(struct inode *dir, struct dentry *dentry)
{
int error;
shrink_dcache_parent(dentry);
rpc_inode_setowner(dentry->d_inode, NULL);
if ((error = simple_rmdir(dir, dentry)) != 0)
return error;
......
......@@ -1272,6 +1272,27 @@ do_xprt_reserve(struct rpc_task *task)
rpc_sleep_on(&xprt->backlog, task, NULL, NULL);
}
/*
* Allocate a 'unique' XID
*/
static u32
xprt_alloc_xid(void)
{
static spinlock_t xid_lock = SPIN_LOCK_UNLOCKED;
static int need_init = 1;
static u32 xid;
u32 ret;
spin_lock(&xid_lock);
if (unlikely(need_init)) {
xid = get_seconds() << 12;
need_init = 0;
}
ret = xid++;
spin_unlock(&xid_lock);
return ret;
}
/*
* Initialize RPC request
*/
......@@ -1279,19 +1300,14 @@ static void
xprt_request_init(struct rpc_task *task, struct rpc_xprt *xprt)
{
struct rpc_rqst *req = task->tk_rqstp;
static u32 xid = 0;
if (!xid)
xid = get_seconds() << 12;
dprintk("RPC: %4d reserved req %p xid %08x\n", task->tk_pid, req, xid);
req->rq_timeout = xprt->timeout;
req->rq_task = task;
req->rq_xprt = xprt;
req->rq_xid = xid++;
if (!xid)
xid++;
req->rq_xid = xprt_alloc_xid();
INIT_LIST_HEAD(&req->rq_list);
dprintk("RPC: %4d reserved req %p xid %08x\n", task->tk_pid,
req, req->rq_xid);
}
/*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment