aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/aic7xxx/aic7xxx_proc.c
diff options
context:
space:
mode:
authorJames Bottomley <James.Bottomley@steeleye.com>2005-05-24 18:15:43 -0400
committerJames Bottomley <jejb@mulgrave.(none)>2005-05-26 14:28:31 -0400
commitb1abb4d67f2a706f52a95064001e0c55d9be2d26 (patch)
tree4095e216afd32cc1681718fa41ad8ca4e37b77fb /drivers/scsi/aic7xxx/aic7xxx_proc.c
parent153b1e1fd957861e2c185473dd3c3d93561066e4 (diff)
[SCSI] aic7xxx: remove separate target and device allocations
Since the aic driver is now taught to speak in terms of the generic linux devices, we can now also dispense with the transport class get routines (since we update the parameters when the driver sees they change) and also plumb it into the spi transport transfer agreement reporting infrastructure. Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/aic7xxx/aic7xxx_proc.c')
-rw-r--r--drivers/scsi/aic7xxx/aic7xxx_proc.c21
1 files changed, 13 insertions, 8 deletions
diff --git a/drivers/scsi/aic7xxx/aic7xxx_proc.c b/drivers/scsi/aic7xxx/aic7xxx_proc.c
index 5fece859fbd9..9c7f1056710d 100644
--- a/drivers/scsi/aic7xxx/aic7xxx_proc.c
+++ b/drivers/scsi/aic7xxx/aic7xxx_proc.c
@@ -50,7 +50,7 @@ static void ahc_dump_target_state(struct ahc_softc *ahc,
50 u_int our_id, char channel, 50 u_int our_id, char channel,
51 u_int target_id, u_int target_offset); 51 u_int target_id, u_int target_offset);
52static void ahc_dump_device_state(struct info_str *info, 52static void ahc_dump_device_state(struct info_str *info,
53 struct ahc_linux_device *dev); 53 struct scsi_device *dev);
54static int ahc_proc_write_seeprom(struct ahc_softc *ahc, 54static int ahc_proc_write_seeprom(struct ahc_softc *ahc,
55 char *buffer, int length); 55 char *buffer, int length);
56 56
@@ -142,6 +142,7 @@ ahc_dump_target_state(struct ahc_softc *ahc, struct info_str *info,
142 u_int target_offset) 142 u_int target_offset)
143{ 143{
144 struct ahc_linux_target *targ; 144 struct ahc_linux_target *targ;
145 struct scsi_target *starget;
145 struct ahc_initiator_tinfo *tinfo; 146 struct ahc_initiator_tinfo *tinfo;
146 struct ahc_tmode_tstate *tstate; 147 struct ahc_tmode_tstate *tstate;
147 int lun; 148 int lun;
@@ -153,7 +154,8 @@ ahc_dump_target_state(struct ahc_softc *ahc, struct info_str *info,
153 copy_info(info, "Target %d Negotiation Settings\n", target_id); 154 copy_info(info, "Target %d Negotiation Settings\n", target_id);
154 copy_info(info, "\tUser: "); 155 copy_info(info, "\tUser: ");
155 ahc_format_transinfo(info, &tinfo->user); 156 ahc_format_transinfo(info, &tinfo->user);
156 targ = ahc->platform_data->targets[target_offset]; 157 starget = ahc->platform_data->starget[target_offset];
158 targ = scsi_transport_target_data(starget);
157 if (targ == NULL) 159 if (targ == NULL)
158 return; 160 return;
159 161
@@ -163,22 +165,25 @@ ahc_dump_target_state(struct ahc_softc *ahc, struct info_str *info,
163 ahc_format_transinfo(info, &tinfo->curr); 165 ahc_format_transinfo(info, &tinfo->curr);
164 166
165 for (lun = 0; lun < AHC_NUM_LUNS; lun++) { 167 for (lun = 0; lun < AHC_NUM_LUNS; lun++) {
166 struct ahc_linux_device *dev; 168 struct scsi_device *sdev;
167 169
168 dev = targ->devices[lun]; 170 sdev = targ->sdev[lun];
169 171
170 if (dev == NULL) 172 if (sdev == NULL)
171 continue; 173 continue;
172 174
173 ahc_dump_device_state(info, dev); 175 ahc_dump_device_state(info, sdev);
174 } 176 }
175} 177}
176 178
177static void 179static void
178ahc_dump_device_state(struct info_str *info, struct ahc_linux_device *dev) 180ahc_dump_device_state(struct info_str *info, struct scsi_device *sdev)
179{ 181{
182 struct ahc_linux_device *dev = scsi_transport_device_data(sdev);
183
180 copy_info(info, "\tChannel %c Target %d Lun %d Settings\n", 184 copy_info(info, "\tChannel %c Target %d Lun %d Settings\n",
181 dev->target->channel + 'A', dev->target->target, dev->lun); 185 sdev->sdev_target->channel + 'A',
186 sdev->sdev_target->id, sdev->lun);
182 187
183 copy_info(info, "\t\tCommands Queued %ld\n", dev->commands_issued); 188 copy_info(info, "\t\tCommands Queued %ld\n", dev->commands_issued);
184 copy_info(info, "\t\tCommands Active %d\n", dev->active); 189 copy_info(info, "\t\tCommands Active %d\n", dev->active);