aic79xx: sane pci probing
Subsystems (2)
PATCH 1/1 aic79xx: sane pci probing
remove ahd_tailq and do sane pci probing. ported over from aic7xxx.
Signed-off-by Christoph Hellwig <[email protected]>
drivers/scsi/aic7xxx/aic79xx.h +0 -6
@@ -1247,9 +1247,6 @@uint16_t user_tagenable;/* Tagged Queuing allowed */ }; -TAILQ_HEAD (ahd_softc_tailq, ahd_softc); -extern struct ahd_softc_tailq ahd_tailq; -/*************************** IO Cell Configuration ****************************/ #define AHD_PRECOMP_SLEW_INDEX \ (AHD_ANNEXCOL_PRECOMP_SLEW - AHD_ANNEXCOL_PER_DEV0)
@@ -1374,8 +1371,6 @@void ahd_pause_and_flushwork (struct ahd_softc *ahd);int ahd_suspend (struct ahd_softc *ahd);int ahd_resume (struct ahd_softc *ahd); -void ahd_softc_insert (struct ahd_softc *); -struct ahd_softc *ahd_find_softc (struct ahd_softc *ahd);void ahd_set_unit (struct ahd_softc *,int );void ahd_set_name (struct ahd_softc *,char *);struct scb *ahd_get_scb (struct ahd_softc *ahd,u_int col_idx);
@@ -1524,7 +1519,6 @@void ahd_print_devinfo (struct ahd_softc *ahd,struct ahd_devinfo *devinfo);void ahd_dump_sglist (struct scb *scb); -void ahd_dump_all_cards_state (void );void ahd_dump_card_state (struct ahd_softc *ahd); int ahd_print_register(ahd_reg_parse_entry_t *table, u_int num_entries,
drivers/scsi/aic7xxx/aic79xx_core.c +2 -101
157 lines not on this page · raw message
drivers/scsi/aic7xxx/aic79xx_osm.c +20 -88
166 lines not on this page · raw message
drivers/scsi/aic7xxx/aic79xx_osm_pci.c +34 -45
99 lines not on this page · raw message
drivers/scsi/aic7xxx/aic79xx_proc.c +1 -10
@@ -285,21 +285,13 @@ ahd_linux_proc_info(struct Scsi_Host *shost, char *buffer, char **start, off_t offset, int length, int inout) { - struct ahd_softc *ahd; + struct ahd_softc *ahd = *(struct ahd_softc **)shost->hostdata;struct info_str info;char ahd_info[256 ]; -u_long l;u_int max_targ;u_int i;int retval; - retval = -EINVAL ; -ahd_list_lock (&l); - ahd =ahd_find_softc (*(struct ahd_softc **)shost->hostdata); - -if (ahd ==NULL ) - goto done; -/* Has data been written to the file? */ if (inout == TRUE) { retval =ahd_proc_write_seeprom (ahd, buffer, length);
@@ -349,6 +341,5 @@ } retval = info.pos > info.offset ? info.pos - info.offset :0 ; done: -ahd_list_unlock (&l);return (retval); }
drivers/scsi/aic7xxx/aic79xx_osm.h +0 -30
@@ -120,7 +120,6 @@/************************* Configuration Data *********************************/ extern uint32_t aic79xx_allow_memio; -extern int aic79xx_detect_complete;extern struct scsi_host_template aic79xx_driver_template;/***************************** Bus Space/DMA **********************************/
@@ -532,17 +531,6 @@ struct ahd_transinfo *tinfo);/******************************** Locking *************************************/ -/* Lock protecting internal data structures */ -static __inlinevoid ahd_lockinit (struct ahd_softc *); -static __inlinevoid ahd_lock (struct ahd_softc *,unsigned long *flags); -static __inlinevoid ahd_unlock (struct ahd_softc *,unsigned long *flags); - -/* Lock held during ahd_list manipulation and ahd softc frees */ -extern spinlock_t ahd_list_spinlock; -static __inlinevoid ahd_list_lockinit (void ); -static __inlinevoid ahd_list_lock (unsigned long *flags); -static __inlinevoid ahd_list_unlock (unsigned long *flags); -static __inlinevoid ahd_lockinit (struct ahd_softc *ahd) {
@@ -561,24 +549,6 @@spin_unlock_irqrestore (&ahd->platform_data->spin_lock, *flags); } -static __inlinevoid -ahd_list_lockinit (void ) -{ -spin_lock_init (&ahd_list_spinlock); -} - -static __inlinevoid -ahd_list_lock (unsigned long *flags) -{ -spin_lock_irqsave (&ahd_list_spinlock, *flags); -} - -static __inlinevoid -ahd_list_unlock (unsigned long *flags) -{ -spin_unlock_irqrestore (&ahd_list_spinlock, *flags); -} -/******************************* PCI Definitions ******************************/ /* * PCIM_xxx: mask to locate subfield in register
drivers/scsi/aic7xxx/aic79xx_pci.c +3 -11
@@ -283,7 +283,6 @@ ahd_pci_config(struct ahd_softc *ahd, struct ahd_pci_identity *entry) { struct scb_data *shared_scb_data; -u_long l;u_int command;uint32_t devconfig;uint16_t subvendor;
@@ -373,16 +372,9 @@* Allow interrupts now that we are completely setup. */ error =ahd_pci_map_int (ahd); -if (error !=0 ) -return (error); - -ahd_list_lock (&l); -/* -* Link this softc in with all other ahd instances. -*/ -ahd_softc_insert (ahd); -ahd_list_unlock (&l); -return (0 ); +if (!error) + ahd->init_level++; +return error; }/*
Quoted 4 lines · Christoph Hellwig
remove
ahd_tailqand do sane pci probing. ported over from aic7xxx.Signed-off-by Christoph Hellwig <[email protected]>
Make sure this gets tested before its applied.
Jeff
Quoted 1 line · Jeff Garzik
Make sure this gets tested before its applied.
Yes, I'm already doing that.
James