diff options
Diffstat (limited to 'drivers/ata/libata-scsi.c')
| -rw-r--r-- | drivers/ata/libata-scsi.c | 21 |
1 files changed, 4 insertions, 17 deletions
diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c index a89172c100f..c16f5c15173 100644 --- a/drivers/ata/libata-scsi.c +++ b/drivers/ata/libata-scsi.c | |||
| @@ -51,6 +51,7 @@ | |||
| 51 | #include <asm/unaligned.h> | 51 | #include <asm/unaligned.h> |
| 52 | 52 | ||
| 53 | #include "libata.h" | 53 | #include "libata.h" |
| 54 | #include "libata-transport.h" | ||
| 54 | 55 | ||
| 55 | #define SECTOR_SIZE 512 | 56 | #define SECTOR_SIZE 512 |
| 56 | #define ATA_SCSI_RBUF_SIZE 4096 | 57 | #define ATA_SCSI_RBUF_SIZE 4096 |
| @@ -64,9 +65,6 @@ static struct ata_device *__ata_scsi_find_dev(struct ata_port *ap, | |||
| 64 | const struct scsi_device *scsidev); | 65 | const struct scsi_device *scsidev); |
| 65 | static struct ata_device *ata_scsi_find_dev(struct ata_port *ap, | 66 | static struct ata_device *ata_scsi_find_dev(struct ata_port *ap, |
| 66 | const struct scsi_device *scsidev); | 67 | const struct scsi_device *scsidev); |
| 67 | static int ata_scsi_user_scan(struct Scsi_Host *shost, unsigned int channel, | ||
| 68 | unsigned int id, unsigned int lun); | ||
| 69 | |||
| 70 | 68 | ||
| 71 | #define RW_RECOVERY_MPAGE 0x1 | 69 | #define RW_RECOVERY_MPAGE 0x1 |
| 72 | #define RW_RECOVERY_MPAGE_LEN 12 | 70 | #define RW_RECOVERY_MPAGE_LEN 12 |
| @@ -106,17 +104,6 @@ static const u8 def_control_mpage[CONTROL_MPAGE_LEN] = { | |||
| 106 | 0, 30 /* extended self test time, see 05-359r1 */ | 104 | 0, 30 /* extended self test time, see 05-359r1 */ |
| 107 | }; | 105 | }; |
| 108 | 106 | ||
| 109 | /* | ||
| 110 | * libata transport template. libata doesn't do real transport stuff. | ||
| 111 | * It just needs the eh_timed_out hook. | ||
| 112 | */ | ||
| 113 | static struct scsi_transport_template ata_scsi_transport_template = { | ||
| 114 | .eh_strategy_handler = ata_scsi_error, | ||
| 115 | .eh_timed_out = ata_scsi_timed_out, | ||
| 116 | .user_scan = ata_scsi_user_scan, | ||
| 117 | }; | ||
| 118 | |||
| 119 | |||
| 120 | static const struct { | 107 | static const struct { |
| 121 | enum link_pm value; | 108 | enum link_pm value; |
| 122 | const char *name; | 109 | const char *name; |
| @@ -3334,7 +3321,7 @@ int ata_scsi_add_hosts(struct ata_host *host, struct scsi_host_template *sht) | |||
| 3334 | *(struct ata_port **)&shost->hostdata[0] = ap; | 3321 | *(struct ata_port **)&shost->hostdata[0] = ap; |
| 3335 | ap->scsi_host = shost; | 3322 | ap->scsi_host = shost; |
| 3336 | 3323 | ||
| 3337 | shost->transportt = &ata_scsi_transport_template; | 3324 | shost->transportt = ata_scsi_transport_template; |
| 3338 | shost->unique_id = ap->print_id; | 3325 | shost->unique_id = ap->print_id; |
| 3339 | shost->max_id = 16; | 3326 | shost->max_id = 16; |
| 3340 | shost->max_lun = 1; | 3327 | shost->max_lun = 1; |
| @@ -3616,8 +3603,8 @@ void ata_scsi_hotplug(struct work_struct *work) | |||
| 3616 | * RETURNS: | 3603 | * RETURNS: |
| 3617 | * Zero. | 3604 | * Zero. |
| 3618 | */ | 3605 | */ |
| 3619 | static int ata_scsi_user_scan(struct Scsi_Host *shost, unsigned int channel, | 3606 | int ata_scsi_user_scan(struct Scsi_Host *shost, unsigned int channel, |
| 3620 | unsigned int id, unsigned int lun) | 3607 | unsigned int id, unsigned int lun) |
| 3621 | { | 3608 | { |
| 3622 | struct ata_port *ap = ata_shost_to_port(shost); | 3609 | struct ata_port *ap = ata_shost_to_port(shost); |
| 3623 | unsigned long flags; | 3610 | unsigned long flags; |
