aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/aic7xxx/aic79xx_proc.c
diff options
context:
space:
mode:
authorHannes Reinecke <hare@suse.de>2005-07-22 10:44:04 -0400
committerJames Bottomley <jejb@mulgrave.(none)>2005-08-03 12:45:14 -0400
commit73a25462100772b72a5d62fd66dff01b53018618 (patch)
treede112862069bcef5786b9878ca89bdcda9a0097c /drivers/scsi/aic7xxx/aic79xx_proc.c
parent60a13213840296b1e32d6781653a0eaa83d04382 (diff)
[SCSI] aic79xx: update to use scsi_transport_spi
This patch updates the aic79xx driver to take advantage of the scsi_transport_spi infrastructure. Patch is quite a mess as some procedures have been reshuffled to be closer to the aic7xxx driver. Rejections fixed and Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/aic7xxx/aic79xx_proc.c')
-rw-r--r--drivers/scsi/aic7xxx/aic79xx_proc.c18
1 files changed, 11 insertions, 7 deletions
diff --git a/drivers/scsi/aic7xxx/aic79xx_proc.c b/drivers/scsi/aic7xxx/aic79xx_proc.c
index 9c631a494ed..2058aa9b5c8 100644
--- a/drivers/scsi/aic7xxx/aic79xx_proc.c
+++ b/drivers/scsi/aic7xxx/aic79xx_proc.c
@@ -49,7 +49,7 @@ static void ahd_dump_target_state(struct ahd_softc *ahd,
49 u_int our_id, char channel, 49 u_int our_id, char channel,
50 u_int target_id, u_int target_offset); 50 u_int target_id, u_int target_offset);
51static void ahd_dump_device_state(struct info_str *info, 51static void ahd_dump_device_state(struct info_str *info,
52 struct ahd_linux_device *dev); 52 struct scsi_device *sdev);
53static int ahd_proc_write_seeprom(struct ahd_softc *ahd, 53static int ahd_proc_write_seeprom(struct ahd_softc *ahd,
54 char *buffer, int length); 54 char *buffer, int length);
55 55
@@ -167,6 +167,7 @@ ahd_dump_target_state(struct ahd_softc *ahd, struct info_str *info,
167 u_int target_offset) 167 u_int target_offset)
168{ 168{
169 struct ahd_linux_target *targ; 169 struct ahd_linux_target *targ;
170 struct scsi_target *starget;
170 struct ahd_initiator_tinfo *tinfo; 171 struct ahd_initiator_tinfo *tinfo;
171 struct ahd_tmode_tstate *tstate; 172 struct ahd_tmode_tstate *tstate;
172 int lun; 173 int lun;
@@ -176,7 +177,8 @@ ahd_dump_target_state(struct ahd_softc *ahd, struct info_str *info,
176 copy_info(info, "Target %d Negotiation Settings\n", target_id); 177 copy_info(info, "Target %d Negotiation Settings\n", target_id);
177 copy_info(info, "\tUser: "); 178 copy_info(info, "\tUser: ");
178 ahd_format_transinfo(info, &tinfo->user); 179 ahd_format_transinfo(info, &tinfo->user);
179 targ = ahd->platform_data->targets[target_offset]; 180 starget = ahd->platform_data->starget[target_offset];
181 targ = scsi_transport_target_data(starget);
180 if (targ == NULL) 182 if (targ == NULL)
181 return; 183 return;
182 184
@@ -184,12 +186,11 @@ ahd_dump_target_state(struct ahd_softc *ahd, struct info_str *info,
184 ahd_format_transinfo(info, &tinfo->goal); 186 ahd_format_transinfo(info, &tinfo->goal);
185 copy_info(info, "\tCurr: "); 187 copy_info(info, "\tCurr: ");
186 ahd_format_transinfo(info, &tinfo->curr); 188 ahd_format_transinfo(info, &tinfo->curr);
187 copy_info(info, "\tTransmission Errors %ld\n", targ->errors_detected);
188 189
189 for (lun = 0; lun < AHD_NUM_LUNS; lun++) { 190 for (lun = 0; lun < AHD_NUM_LUNS; lun++) {
190 struct ahd_linux_device *dev; 191 struct scsi_device *dev;
191 192
192 dev = targ->devices[lun]; 193 dev = targ->sdev[lun];
193 194
194 if (dev == NULL) 195 if (dev == NULL)
195 continue; 196 continue;
@@ -199,10 +200,13 @@ ahd_dump_target_state(struct ahd_softc *ahd, struct info_str *info,
199} 200}
200 201
201static void 202static void
202ahd_dump_device_state(struct info_str *info, struct ahd_linux_device *dev) 203ahd_dump_device_state(struct info_str *info, struct scsi_device *sdev)
203{ 204{
205 struct ahd_linux_device *dev = scsi_transport_device_data(sdev);
206
204 copy_info(info, "\tChannel %c Target %d Lun %d Settings\n", 207 copy_info(info, "\tChannel %c Target %d Lun %d Settings\n",
205 dev->target->channel + 'A', dev->target->target, dev->lun); 208 sdev->sdev_target->channel + 'A',
209 sdev->sdev_target->id, sdev->lun);
206 210
207 copy_info(info, "\t\tCommands Queued %ld\n", dev->commands_issued); 211 copy_info(info, "\t\tCommands Queued %ld\n", dev->commands_issued);
208 copy_info(info, "\t\tCommands Active %d\n", dev->active); 212 copy_info(info, "\t\tCommands Active %d\n", dev->active);