Loading drivers/scsi/libata-scsi.c +37 −25 Original line number Diff line number Diff line Loading @@ -662,33 +662,17 @@ void ata_gen_fixed_sense(struct ata_queued_cmd *qc) } } /** * ata_scsi_slave_config - Set SCSI device attributes * @sdev: SCSI device to examine * * This is called before we actually start reading * and writing to the device, to configure certain * SCSI mid-layer behaviors. * * LOCKING: * Defined by SCSI layer. We don't really care. */ int ata_scsi_slave_config(struct scsi_device *sdev) static void ata_scsi_sdev_config(struct scsi_device *sdev) { sdev->use_10_for_rw = 1; sdev->use_10_for_ms = 1; } blk_queue_max_phys_segments(sdev->request_queue, LIBATA_MAX_PRD); if (sdev->id < ATA_MAX_DEVICES) { struct ata_port *ap; struct ata_device *dev; static void ata_scsi_dev_config(struct scsi_device *sdev, struct ata_device *dev) { unsigned int max_sectors; ap = (struct ata_port *) &sdev->host->hostdata[0]; dev = &ap->device[sdev->id]; /* TODO: 2048 is an arbitrary number, not the * hardware maximum. This should be increased to * 65534 when Jens Axboe's patch for dynamically Loading @@ -713,6 +697,34 @@ int ata_scsi_slave_config(struct scsi_device *sdev) } } /** * ata_scsi_slave_config - Set SCSI device attributes * @sdev: SCSI device to examine * * This is called before we actually start reading * and writing to the device, to configure certain * SCSI mid-layer behaviors. * * LOCKING: * Defined by SCSI layer. We don't really care. */ int ata_scsi_slave_config(struct scsi_device *sdev) { ata_scsi_sdev_config(sdev); blk_queue_max_phys_segments(sdev->request_queue, LIBATA_MAX_PRD); if (sdev->id < ATA_MAX_DEVICES) { struct ata_port *ap; struct ata_device *dev; ap = (struct ata_port *) &sdev->host->hostdata[0]; dev = &ap->device[sdev->id]; ata_scsi_dev_config(sdev, dev); } return 0; /* scsi layer doesn't check return value, sigh */ } Loading Loading
drivers/scsi/libata-scsi.c +37 −25 Original line number Diff line number Diff line Loading @@ -662,33 +662,17 @@ void ata_gen_fixed_sense(struct ata_queued_cmd *qc) } } /** * ata_scsi_slave_config - Set SCSI device attributes * @sdev: SCSI device to examine * * This is called before we actually start reading * and writing to the device, to configure certain * SCSI mid-layer behaviors. * * LOCKING: * Defined by SCSI layer. We don't really care. */ int ata_scsi_slave_config(struct scsi_device *sdev) static void ata_scsi_sdev_config(struct scsi_device *sdev) { sdev->use_10_for_rw = 1; sdev->use_10_for_ms = 1; } blk_queue_max_phys_segments(sdev->request_queue, LIBATA_MAX_PRD); if (sdev->id < ATA_MAX_DEVICES) { struct ata_port *ap; struct ata_device *dev; static void ata_scsi_dev_config(struct scsi_device *sdev, struct ata_device *dev) { unsigned int max_sectors; ap = (struct ata_port *) &sdev->host->hostdata[0]; dev = &ap->device[sdev->id]; /* TODO: 2048 is an arbitrary number, not the * hardware maximum. This should be increased to * 65534 when Jens Axboe's patch for dynamically Loading @@ -713,6 +697,34 @@ int ata_scsi_slave_config(struct scsi_device *sdev) } } /** * ata_scsi_slave_config - Set SCSI device attributes * @sdev: SCSI device to examine * * This is called before we actually start reading * and writing to the device, to configure certain * SCSI mid-layer behaviors. * * LOCKING: * Defined by SCSI layer. We don't really care. */ int ata_scsi_slave_config(struct scsi_device *sdev) { ata_scsi_sdev_config(sdev); blk_queue_max_phys_segments(sdev->request_queue, LIBATA_MAX_PRD); if (sdev->id < ATA_MAX_DEVICES) { struct ata_port *ap; struct ata_device *dev; ap = (struct ata_port *) &sdev->host->hostdata[0]; dev = &ap->device[sdev->id]; ata_scsi_dev_config(sdev, dev); } return 0; /* scsi layer doesn't check return value, sigh */ } Loading