git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
This commit was manufactured by cvs2svn to create tag
[linux-2.6.git]
/
drivers
/
scsi
/
aic7xxx
/
aic7xxx_osm.c
diff --git
a/drivers/scsi/aic7xxx/aic7xxx_osm.c
b/drivers/scsi/aic7xxx/aic7xxx_osm.c
index
a3e0d14
..
0eb01bd
100644
(file)
--- a/
drivers/scsi/aic7xxx/aic7xxx_osm.c
+++ b/
drivers/scsi/aic7xxx/aic7xxx_osm.c
@@
-843,7
+843,8
@@
static int
ahc_linux_detect(Scsi_Host_Template *template)
{
struct ahc_softc *ahc;
ahc_linux_detect(Scsi_Host_Template *template)
{
struct ahc_softc *ahc;
- int found;
+ int found = 0;
+ int eisa_err, pci_err;
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
/*
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
/*
@@
-891,28
+892,29
@@
ahc_linux_detect(Scsi_Host_Template *template)
*/
ahc_list_lockinit();
*/
ahc_list_lockinit();
-#ifdef CONFIG_PCI
- ahc_linux_pci_init();
-#endif
+ pci_err = ahc_linux_pci_init();
+ eisa_err = ahc_linux_eisa_init();
+
+ if(pci_err && eisa_err)
+ goto out;
-#ifdef CONFIG_EISA
- ahc_linux_eisa_init();
-#endif
/*
* Register with the SCSI layer all
* controllers we've found.
*/
/*
* Register with the SCSI layer all
* controllers we've found.
*/
- found = 0;
TAILQ_FOREACH(ahc, &ahc_tailq, links) {
if (ahc_linux_register_host(ahc, template) == 0)
found++;
}
TAILQ_FOREACH(ahc, &ahc_tailq, links) {
if (ahc_linux_register_host(ahc, template) == 0)
found++;
}
+out:
+
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
spin_lock_irq(&io_request_lock);
#endif
aic7xxx_detect_complete++;
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
spin_lock_irq(&io_request_lock);
#endif
aic7xxx_detect_complete++;
+
return (found);
}
return (found);
}
@@
-1534,6
+1536,7
@@
ahc_softc_comp(struct ahc_softc *lahc, struct ahc_softc *rahc)
/* Still equal. Sort by BIOS address, ioport, or bus/slot/func. */
switch (rvalue) {
/* Still equal. Sort by BIOS address, ioport, or bus/slot/func. */
switch (rvalue) {
+#ifdef CONFIG_PCI
case AHC_PCI:
{
char primary_channel;
case AHC_PCI:
{
char primary_channel;
@@
-1566,6
+1569,7
@@
ahc_softc_comp(struct ahc_softc *lahc, struct ahc_softc *rahc)
value = 1;
break;
}
value = 1;
break;
}
+#endif
case AHC_EISA:
if ((rahc->flags & AHC_BIOS_ENABLED) != 0) {
value = rahc->platform_data->bios_address
case AHC_EISA:
if ((rahc->flags & AHC_BIOS_ENABLED) != 0) {
value = rahc->platform_data->bios_address
@@
-2296,6
+2300,7
@@
ahc_linux_dv_thread(void *data)
sprintf(current->comm, "ahc_dv_%d", ahc->unit);
#else
daemonize("ahc_dv_%d", ahc->unit);
sprintf(current->comm, "ahc_dv_%d", ahc->unit);
#else
daemonize("ahc_dv_%d", ahc->unit);
+ current->flags |= PF_FREEZE;
#endif
unlock_kernel();
#endif
unlock_kernel();
@@
-3969,11
+3974,10
@@
ahc_linux_alloc_device(struct ahc_softc *ahc,
}
static void
}
static void
-ahc_linux_free_device(struct ahc_softc *ahc, struct ahc_linux_device *dev)
+
__
ahc_linux_free_device(struct ahc_softc *ahc, struct ahc_linux_device *dev)
{
struct ahc_linux_target *targ;
{
struct ahc_linux_target *targ;
- del_timer_sync(&dev->timer);
targ = dev->target;
targ->devices[dev->lun] = NULL;
free(dev, M_DEVBUF);
targ = dev->target;
targ->devices[dev->lun] = NULL;
free(dev, M_DEVBUF);
@@
-3983,6
+3987,13
@@
ahc_linux_free_device(struct ahc_softc *ahc, struct ahc_linux_device *dev)
ahc_linux_free_target(ahc, targ);
}
ahc_linux_free_target(ahc, targ);
}
+static void
+ahc_linux_free_device(struct ahc_softc *ahc, struct ahc_linux_device *dev)
+{
+ del_timer_sync(&dev->timer);
+ __ahc_linux_free_device(ahc, dev);
+}
+
void
ahc_send_async(struct ahc_softc *ahc, char channel,
u_int target, u_int lun, ac_code code, void *arg)
void
ahc_send_async(struct ahc_softc *ahc, char channel,
u_int target, u_int lun, ac_code code, void *arg)
@@
-4693,7
+4704,7
@@
ahc_linux_dev_timed_unfreeze(u_long arg)
ahc_linux_run_device_queue(ahc, dev);
if (TAILQ_EMPTY(&dev->busyq)
&& dev->active == 0)
ahc_linux_run_device_queue(ahc, dev);
if (TAILQ_EMPTY(&dev->busyq)
&& dev->active == 0)
- ahc_linux_free_device(ahc, dev);
+
__
ahc_linux_free_device(ahc, dev);
ahc_unlock(ahc, &s);
}
ahc_unlock(ahc, &s);
}
@@
-5067,11
+5078,17
@@
ahc_platform_dump_card_state(struct ahc_softc *ahc)
}
}
}
}
+static void ahc_linux_exit(void);
+
static int __init
ahc_linux_init(void)
{
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
static int __init
ahc_linux_init(void)
{
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
- return (ahc_linux_detect(&aic7xxx_driver_template) ? 0 : -ENODEV);
+ int rc = ahc_linux_detect(&aic7xxx_driver_template);
+ if (rc)
+ return rc;
+ ahc_linux_exit();
+ return -ENODEV;
#else
scsi_register_module(MODULE_SCSI_HA, &aic7xxx_driver_template);
if (aic7xxx_driver_template.present == 0) {
#else
scsi_register_module(MODULE_SCSI_HA, &aic7xxx_driver_template);
if (aic7xxx_driver_template.present == 0) {
@@
-5084,7
+5101,7
@@
ahc_linux_init(void)
#endif
}
#endif
}
-static void
__exit
+static void
ahc_linux_exit(void)
{
struct ahc_softc *ahc;
ahc_linux_exit(void)
{
struct ahc_softc *ahc;
@@
-5111,12
+5128,8
@@
ahc_linux_exit(void)
*/
scsi_unregister_module(MODULE_SCSI_HA, &aic7xxx_driver_template);
#endif
*/
scsi_unregister_module(MODULE_SCSI_HA, &aic7xxx_driver_template);
#endif
-#ifdef CONFIG_PCI
ahc_linux_pci_exit();
ahc_linux_pci_exit();
-#endif
-#ifdef CONFIG_EISA
ahc_linux_eisa_exit();
ahc_linux_eisa_exit();
-#endif
}
module_init(ahc_linux_init);
}
module_init(ahc_linux_init);