--- zzzz-none-000/linux-2.6.19.2/drivers/scsi/aic7xxx/aic79xx_osm.c 2007-01-10 19:10:37.000000000 +0000 +++ davinci-8020-5505/linux-2.6.19.2/drivers/scsi/aic7xxx/aic79xx_osm.c 2007-01-11 07:38:19.000000000 +0000 @@ -293,7 +293,7 @@ * force all outstanding transactions to be serviced prior to a new * transaction. */ -static uint32_t aic79xx_periodic_otag; +uint32_t aic79xx_periodic_otag; /* Some storage boxes are using an LSI chip which has a bug making it * impossible to use aic79xx Rev B chip in 320 speeds. The following @@ -773,7 +773,6 @@ #endif .can_queue = AHD_MAX_QUEUE, .this_id = -1, - .max_sectors = 8192, .cmd_per_lun = 2, .use_clustering = ENABLE_CLUSTERING, .slave_alloc = ahd_linux_slave_alloc, @@ -1814,9 +1813,9 @@ u_int sense_offset; if (scb->flags & SCB_SENSE) { - sense_size = min(sizeof(struct scsi_sense_data) + sense_size = MIN(sizeof(struct scsi_sense_data) - ahd_get_sense_residual(scb), - (u_long)sizeof(cmd->sense_buffer)); + sizeof(cmd->sense_buffer)); sense_offset = 0; } else { /* @@ -1825,8 +1824,7 @@ */ siu = (struct scsi_status_iu_header *) scb->sense_data; - sense_size = min_t(size_t, - scsi_4btoul(siu->sense_length), + sense_size = MIN(scsi_4btoul(siu->sense_length), sizeof(cmd->sense_buffer)); sense_offset = SIU_SENSE_OFFSET(siu); } @@ -2636,22 +2634,8 @@ pcomp ? "Enable" : "Disable"); #endif - if (pcomp) { - uint8_t precomp; - - if (ahd->unit < ARRAY_SIZE(aic79xx_iocell_info)) { - struct ahd_linux_iocell_opts *iocell_opts; - - iocell_opts = &aic79xx_iocell_info[ahd->unit]; - precomp = iocell_opts->precomp; - } else { - precomp = AIC79XX_DEFAULT_PRECOMP; - } + if (pcomp) ppr_options |= MSG_EXT_PPR_PCOMP_EN; - AHD_SET_PRECOMP(ahd, precomp); - } else { - AHD_SET_PRECOMP(ahd, 0); - } ahd_compile_devinfo(&devinfo, shost->this_id, starget->id, 0, starget->channel + 'A', ROLE_INITIATOR); @@ -2694,25 +2678,7 @@ ahd_unlock(ahd, &flags); } -static void ahd_linux_get_signalling(struct Scsi_Host *shost) -{ - struct ahd_softc *ahd = *(struct ahd_softc **)shost->hostdata; - unsigned long flags; - u8 mode; - - ahd_lock(ahd, &flags); - ahd_pause(ahd); - mode = ahd_inb(ahd, SBLKCTL); - ahd_unpause(ahd); - ahd_unlock(ahd, &flags); - if (mode & ENAB40) - spi_signalling(shost) = SPI_SIGNAL_LVD; - else if (mode & ENAB20) - spi_signalling(shost) = SPI_SIGNAL_SE; - else - spi_signalling(shost) = SPI_SIGNAL_UNKNOWN; -} static struct spi_function_template ahd_linux_transport_functions = { .set_offset = ahd_linux_set_offset, @@ -2737,7 +2703,6 @@ .show_pcomp_en = 1, .set_hold_mcs = ahd_linux_set_hold_mcs, .show_hold_mcs = 1, - .get_signalling = ahd_linux_get_signalling, }; static int __init