Commit 596a338d authored by Linus Torvalds's avatar Linus Torvalds

Merge bk://kernel.bkbits.net/davem/net-2.5

into home.osdl.org:/home/torvalds/v2.5/linux
parents 4010133e d964d911
......@@ -644,6 +644,13 @@ static inline u8 probe_for_drive (ide_drive_t *drive)
return drive->present;
}
static void hwif_release_dev (struct device *dev)
{
ide_hwif_t *hwif = container_of(dev, ide_hwif_t, gendev);
up(&hwif->gendev_rel_sem);
}
static void hwif_register (ide_hwif_t *hwif)
{
/* register with global device tree */
......@@ -656,6 +663,7 @@ static void hwif_register (ide_hwif_t *hwif)
/* Would like to do = &device_legacy */
hwif->gendev.parent = NULL;
}
hwif->gendev.release = hwif_release_dev;
device_register(&hwif->gendev);
}
......@@ -1196,6 +1204,13 @@ static int alloc_disks(ide_hwif_t *hwif)
return -ENOMEM;
}
static void drive_release_dev (struct device *dev)
{
ide_drive_t *drive = container_of(dev, ide_drive_t, gendev);
up(&drive->gendev_rel_sem);
}
/*
* init_gendisk() (as opposed to ide_geninit) is called for each major device,
* after probing for drives, to allocate partition tables and other data
......@@ -1214,6 +1229,7 @@ static void init_gendisk (ide_hwif_t *hwif)
drive->gendev.parent = &hwif->gendev;
drive->gendev.bus = &ide_bus_type;
drive->gendev.driver_data = drive;
drive->gendev.release = drive_release_dev;
if (drive->present) {
device_register(&drive->gendev);
sprintf(drive->devfs_name, "ide/host%d/bus%d/target%d/lun%d",
......
......@@ -251,6 +251,8 @@ static void init_hwif_data (unsigned int index)
hwif->mwdma_mask = 0x80; /* disable all mwdma */
hwif->swdma_mask = 0x80; /* disable all swdma */
sema_init(&hwif->gendev_rel_sem, 0);
default_hwif_iops(hwif);
default_hwif_transport(hwif);
for (unit = 0; unit < MAX_DRIVES; ++unit) {
......@@ -273,6 +275,7 @@ static void init_hwif_data (unsigned int index)
drive->driver = &idedefault_driver;
drive->vdma = 0;
INIT_LIST_HEAD(&drive->list);
sema_init(&drive->gendev_rel_sem, 0);
}
}
......@@ -745,6 +748,7 @@ void ide_unregister (unsigned int index)
spin_unlock_irq(&ide_lock);
blk_cleanup_queue(drive->queue);
device_unregister(&drive->gendev);
down(&drive->gendev_rel_sem);
spin_lock_irq(&ide_lock);
drive->queue = NULL;
}
......@@ -774,6 +778,7 @@ void ide_unregister (unsigned int index)
/* More messed up locking ... */
spin_unlock_irq(&ide_lock);
device_unregister(&hwif->gendev);
down(&hwif->gendev_rel_sem);
/*
* Remove us from the kernel's knowledge
......
This diff is collapsed.
......@@ -13,12 +13,6 @@
#undef SIIMAGE_BUFFERED_TASKFILE
#undef SIIMAGE_LARGE_DMA
#if 0
typedef struct ide_io_ops_s siimage_iops {
}
#endif
#define SII_DEBUG 0
#if SII_DEBUG
......@@ -27,12 +21,6 @@ typedef struct ide_io_ops_s siimage_iops {
#define siiprintk(x...)
#endif
#define ADJREG(B,R) ((B)|(R)|((hwif->channel)<<(4+(2*(hwif->mmio)))))
#define SELREG(R) ADJREG((0xA0),(R))
#define SELADDR(R) ((((unsigned long)hwif->hwif_data)*(hwif->mmio))|SELREG((R)))
#define HWIFADDR(R) ((((unsigned long)hwif->hwif_data)*(hwif->mmio))|(R))
#define DEVADDR(R) (((unsigned long) pci_get_drvdata(dev))|(R))
#if defined(DISPLAY_SIIMAGE_TIMINGS) && defined(CONFIG_PROC_FS)
#include <linux/stat.h>
......@@ -85,6 +73,19 @@ static ide_pci_device_t siimage_chipsets[] __devinitdata = {
.enablebits = {{0x00,0x00,0x00}, {0x00,0x00,0x00}},
.bootable = ON_BOARD,
.extra = 0,
},{ /* 2 */
.vendor = PCI_VENDOR_ID_CMD,
.device = PCI_DEVICE_ID_SII_1210SA,
.name = "Adaptec AAR-1210SA",
.init_chipset = init_chipset_siimage,
.init_iops = init_iops_siimage,
.init_hwif = init_hwif_siimage,
.init_dma = init_dma_siimage,
.channels = 2,
.autodma = AUTODMA,
.enablebits = {{0x00,0x00,0x00}, {0x00,0x00,0x00}},
.bootable = ON_BOARD,
.extra = 0,
},{
.vendor = 0,
.device = 0,
......
......@@ -38,6 +38,7 @@
#include <linux/version.h>
#include <linux/smp_lock.h>
#include <linux/interrupt.h>
#include <linux/vmalloc.h>
#include <asm/uaccess.h>
#include <asm/atomic.h>
#include <linux/devfs_fs_kernel.h>
......
......@@ -59,42 +59,37 @@
/* AEN strings */
static char *tw_aen_string[] = {
"INFO: AEN queue empty", // 0x000
"INFO: Soft reset occurred", // 0x001
"ERROR: Unit degraded: Unit #", // 0x002
"ERROR: Controller error", // 0x003
"ERROR: Rebuild failed: Unit #", // 0x004
"INFO: Rebuild complete: Unit #", // 0x005
"ERROR: Incomplete unit detected: Unit #", // 0x006
"INFO: Initialization complete: Unit #", // 0x007
"WARNING: Unclean shutdown detected: Unit #", // 0x008
"WARNING: ATA port timeout: Port #", // 0x009
"ERROR: Drive error: Port #", // 0x00A
"INFO: Rebuild started: Unit #", // 0x00B
"INFO: Initialization started: Unit #", // 0x00C
"ERROR: Logical unit deleted: Unit #", // 0x00D
NULL, // 0x00E unused
"WARNING: SMART threshold exceeded: Port #", // 0x00F
NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL,
NULL, NULL, // 0x010-0x020 unused
"WARNING: ATA UDMA downgrade: Port #", // 0x021
"WARNING: ATA UDMA upgrade: Port #", // 0x022
"WARNING: Sector repair occurred: Port #", // 0x023
"ERROR: SBUF integrity check failure", // 0x024
"ERROR: Lost cached write: Port #", // 0x025
"ERROR: Drive ECC error detected: Port #", // 0x026
"ERROR: DCB checksum error: Port #", // 0x027
"ERROR: DCB unsupported version: Port #", // 0x028
"INFO: Verify started: Unit #", // 0x029
"ERROR: Verify failed: Port #", // 0x02A
"INFO: Verify complete: Unit #", // 0x02B
"WARNING: Overwrote bad sector during rebuild: Port #", //0x02C
"ERROR: Encountered bad sector during rebuild: Port #", //0x02D
"ERROR: Replacement drive is too small: Port #", //0x02E
"WARNING: Verify error: Unit not previously initialized: Unit #", //0x02F
"ERROR: Drive not supported: Port #" // 0x030
[0x000] = "INFO: AEN queue empty",
[0x001] = "INFO: Soft reset occurred",
[0x002] = "ERROR: Unit degraded: Unit #",
[0x003] = "ERROR: Controller error",
[0x004] = "ERROR: Rebuild failed: Unit #",
[0x005] = "INFO: Rebuild complete: Unit #",
[0x006] = "ERROR: Incomplete unit detected: Unit #",
[0x007] = "INFO: Initialization complete: Unit #",
[0x008] = "WARNING: Unclean shutdown detected: Unit #",
[0x009] = "WARNING: ATA port timeout: Port #",
[0x00A] = "ERROR: Drive error: Port #",
[0x00B] = "INFO: Rebuild started: Unit #",
[0x00C] = "INFO: Initialization started: Unit #",
[0x00D] = "ERROR: Logical unit deleted: Unit #",
[0x00F] = "WARNING: SMART threshold exceeded: Port #",
[0x021] = "WARNING: ATA UDMA downgrade: Port #",
[0x021] = "WARNING: ATA UDMA upgrade: Port #",
[0x023] = "WARNING: Sector repair occurred: Port #",
[0x024] = "ERROR: SBUF integrity check failure",
[0x025] = "ERROR: Lost cached write: Port #",
[0x026] = "ERROR: Drive ECC error detected: Port #",
[0x027] = "ERROR: DCB checksum error: Port #",
[0x028] = "ERROR: DCB unsupported version: Port #",
[0x029] = "INFO: Verify started: Unit #",
[0x02A] = "ERROR: Verify failed: Port #",
[0x02B] = "INFO: Verify complete: Unit #",
[0x02C] = "WARNING: Overwrote bad sector during rebuild: Port #",
[0x02D] = "ERROR: Encountered bad sector during rebuild: Port #",
[0x02E] = "ERROR: Replacement drive is too small: Port #",
[0x02F] = "WARNING: Verify error: Unit not previously initialized: Unit #",
[0x030] = "ERROR: Drive not supported: Port #",
};
/*
......
......@@ -18,10 +18,6 @@ int wd33c93_queuecommand(Scsi_Cmnd *, void (*done)(Scsi_Cmnd *));
int wd33c93_abort(Scsi_Cmnd *);
int wd33c93_reset(Scsi_Cmnd *, unsigned int);
#ifndef NULL
#define NULL 0
#endif
#ifndef CMD_PER_LUN
#define CMD_PER_LUN 2
#endif
......
......@@ -18,10 +18,6 @@ int wd33c93_queuecommand(Scsi_Cmnd *, void (*done)(Scsi_Cmnd *));
int wd33c93_abort(Scsi_Cmnd *);
int wd33c93_reset(Scsi_Cmnd *, unsigned int);
#ifndef NULL
#define NULL 0
#endif
#ifndef CMD_PER_LUN
#define CMD_PER_LUN 2
#endif
......
......@@ -146,8 +146,4 @@ static int aha1542_biosparam(struct scsi_device *, struct block_device *,
#define AHA1542_SCATTER 16
#define AHA1542_CMDLUN 1
#ifndef NULL
#define NULL 0
#endif
#endif
......@@ -10,10 +10,6 @@ int NCR53c7x0_release (struct Scsi_Host *);
int NCR53c7xx_reset(Scsi_Cmnd *, unsigned int);
void NCR53c7x0_intr(int irq, void *dev_id, struct pt_regs * regs);
#ifndef NULL
#define NULL 0
#endif
#ifndef CMD_PER_LUN
#define CMD_PER_LUN 3
#endif
......
......@@ -28,10 +28,6 @@ static int atp870u_release(struct Scsi_Host *);
#define ATP870U_SCATTER 128
#define ATP870U_CMDLUN 1
#ifndef NULL
#define NULL 0
#endif
extern const char *atp870u_info(struct Scsi_Host *);
#endif
......@@ -11,10 +11,6 @@ int NCR53c7x0_release (struct Scsi_Host *);
int NCR53c7xx_reset(Scsi_Cmnd *, unsigned int);
void NCR53c7x0_intr(int irq, void *dev_id, struct pt_regs * regs);
#ifndef NULL
#define NULL 0
#endif
#ifndef CMD_PER_LUN
#define CMD_PER_LUN 3
#endif
......
......@@ -16,9 +16,6 @@
#include <linux/version.h>
#include <linux/types.h>
#ifndef NULL
#define NULL 0
#endif
#ifndef TRUE
#define TRUE 1
#endif
......
......@@ -18,10 +18,6 @@ int wd33c93_queuecommand(Scsi_Cmnd *, void (*done)(Scsi_Cmnd *));
int wd33c93_abort(Scsi_Cmnd *);
int wd33c93_reset(Scsi_Cmnd *, unsigned int);
#ifndef NULL
#define NULL 0
#endif
#ifndef CMD_PER_LUN
#define CMD_PER_LUN 2
#endif
......
......@@ -67,9 +67,6 @@
#define UDWORD unsigned long
#define U32 u32
#ifndef NULL
#define NULL 0 /* zero */
#endif
#ifndef FAILURE
#define FAILURE (-1)
#endif
......
......@@ -96,17 +96,18 @@
static char *IMM_MODE_STRING[] =
{
"Autodetect",
"SPP",
"PS/2",
"EPP 8 bit",
"EPP 16 bit",
[IMM_AUTODETECT] = "Autodetect",
[IMM_NIBBLE] = "SPP",
[IMM_PS2] = "PS/2",
[IMM_EPP_8] = "EPP 8 bit",
[IMM_EPP_16] = "EPP 16 bit",
#ifdef CONFIG_SCSI_IZIP_EPP16
"EPP 16 bit",
[IMM_EPP_16] = "EPP 16 bit",
#else
"EPP 32 bit",
[IMM_EPP_32] = "EPP 32 bit",
#endif
"Unknown"};
[IMM_UNKNOWN] = "Unknown",
};
/* This is a global option */
int imm_sg = SG_ALL; /* enable/disable scatter-gather. */
......
......@@ -99,9 +99,6 @@ extern int i91u_biosparam(struct scsi_device *, struct block_device *,
#define UDWORD unsigned long
#define U32 u32
#ifndef NULL
#define NULL 0 /* zero */
#endif
#ifndef TRUE
#define TRUE (1) /* boolean true */
#endif
......
......@@ -88,9 +88,6 @@ static int inia100_bus_reset(Scsi_Cmnd *);
#define UDWORD unsigned long
#define U32 u32
#ifndef NULL
#define NULL 0 /* zero */
#endif
#ifndef FAILURE
#define FAILURE (-1)
#endif
......
......@@ -32,9 +32,6 @@
#define MACSCSI_PUBLIC_RELEASE 2
#ifndef ASM
#ifndef NULL
#define NULL 0
#endif
#ifndef CMD_PER_LUN
#define CMD_PER_LUN 2
......
......@@ -17,10 +17,6 @@ int wd33c93_queuecommand(Scsi_Cmnd *, void (*done)(Scsi_Cmnd *));
int wd33c93_abort(Scsi_Cmnd *);
int wd33c93_reset(Scsi_Cmnd *, unsigned int);
#ifndef NULL
#define NULL 0
#endif
#ifndef CMD_PER_LUN
#define CMD_PER_LUN 2
#endif
......
......@@ -11,10 +11,6 @@ int NCR53c7x0_release (struct Scsi_Host *);
int NCR53c7xx_reset(Scsi_Cmnd *, unsigned int);
void NCR53c7x0_intr(int irq, void *dev_id, struct pt_regs * regs);
#ifndef NULL
#define NULL 0
#endif
#ifndef CMD_PER_LUN
#define CMD_PER_LUN 3
#endif
......
......@@ -123,10 +123,6 @@ static int pas16_bus_reset(Scsi_Cmnd *);
static int pas16_host_reset(Scsi_Cmnd *);
static int pas16_device_reset(Scsi_Cmnd *);
#ifndef NULL
#define NULL 0
#endif
#ifndef CMD_PER_LUN
#define CMD_PER_LUN 2
#endif
......
......@@ -197,8 +197,4 @@ int Pci2000_BiosParam (struct scsi_device *sdev,
struct block_device *bdev,
sector_t capacity, int geom[]);
#ifndef NULL
#define NULL 0
#endif
#endif
......@@ -36,8 +36,4 @@ int Pci2220i_Release (struct Scsi_Host *pshost);
int Pci2220i_BiosParam (struct scsi_device *sdev,
struct block_device *dev,
sector_t capacity, int geom[]);
#ifndef NULL
#define NULL 0
#endif
#endif
......@@ -316,8 +316,4 @@ int Psi240i_Abort (Scsi_Cmnd *SCpnt);
int Psi240i_Reset (Scsi_Cmnd *SCpnt, unsigned int flags);
int Psi240i_BiosParam (struct scsi_device *sdev, struct block_device *bdev,
sector_t capacity, int geom[]);
#ifndef NULL
#define NULL 0
#endif
#endif
......@@ -77,9 +77,4 @@ int isp2x00_abort(Scsi_Cmnd *);
int isp2x00_reset(Scsi_Cmnd *, unsigned int);
int isp2x00_biosparam(struct scsi_device *, struct block_device *,
sector_t, int[]);
#ifndef NULL
#define NULL (0)
#endif
#endif /* _QLOGICFC_H */
......@@ -66,8 +66,4 @@ int isp1020_abort(Scsi_Cmnd *);
int isp1020_reset(Scsi_Cmnd *, unsigned int);
int isp1020_biosparam(struct scsi_device *, struct block_device *,
sector_t, int[]);
#ifndef NULL
#define NULL (0)
#endif
#endif /* _QLOGICISP_H */
......@@ -6,10 +6,6 @@
#ifndef _SGIWD93_H
#define _SGIWD93_H
#ifndef NULL
#define NULL 0
#endif
#ifndef CMD_PER_LUN
#define CMD_PER_LUN 8
#endif
......
......@@ -36,11 +36,6 @@
#ifndef SUN3_NCR5380_H
#define SUN3_NCR5380_H
#ifndef NULL
#define NULL 0
#endif
#define SUN3SCSI_PUBLIC_RELEASE 1
/*
......
......@@ -100,10 +100,6 @@ static int t128_host_reset(Scsi_Cmnd *);
static int t128_bus_reset(Scsi_Cmnd *);
static int t128_device_reset(Scsi_Cmnd *);
#ifndef NULL
#define NULL 0
#endif
#ifndef CMD_PER_LUN
#define CMD_PER_LUN 2
#endif
......
......@@ -22,6 +22,7 @@
#include <asm/system.h>
#include <asm/hdreg.h>
#include <asm/io.h>
#include <asm/semaphore.h>
#define DEBUG_PM
......@@ -774,6 +775,7 @@ typedef struct ide_drive_s {
int crc_count; /* crc counter to reduce drive speed */
struct list_head list;
struct device gendev;
struct semaphore gendev_rel_sem; /* to deal with device release() */
struct gendisk *disk;
} ide_drive_t;
......@@ -1040,6 +1042,7 @@ typedef struct hwif_s {
unsigned auto_poll : 1; /* supports nop auto-poll */
struct device gendev;
struct semaphore gendev_rel_sem; /* To deal with device release() */
void *hwif_data; /* extra hwif data */
......
......@@ -878,6 +878,7 @@
#define PCI_DEVICE_ID_SII_680 0x0680
#define PCI_DEVICE_ID_SII_3112 0x3112
#define PCI_DEVICE_ID_SII_1210SA 0x0240
#define PCI_VENDOR_ID_VISION 0x1098
#define PCI_DEVICE_ID_VISION_QD8500 0x0001
......
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