2 * hosts.h Copyright (C) 1992 Drew Eckhardt
3 * Copyright (C) 1993, 1994, 1995, 1998, 1999 Eric Youngdale
5 * mid to low-level SCSI driver interface header
6 * Initial versions: Drew Eckhardt
7 * Subsequent revisions: Eric Youngdale
11 * Modified by Eric Youngdale eric@andante.org to
12 * add scatter-gather, multiple outstanding request, and other
15 * Further modified by Eric Youngdale to support multiple host adapters
18 * Jiffies wrap fixes (host->resetting), 3 Dec 1998 Andrea Arcangeli
20 * Restructured scsi_host lists and associated functions.
21 * September 04, 2002 Mike Anderson (andmike@us.ibm.com)
27 #include <linux/config.h>
28 #include <linux/proc_fs.h>
30 #include <scsi/scsi_host.h>
33 * scsi_find_device - find a device given the host
34 * @shost: SCSI host pointer
35 * @channel: SCSI channel (zero if only one channel)
36 * @pun: SCSI target number (physical unit number)
37 * @lun: SCSI Logical Unit Number
39 static inline struct scsi_device
*scsi_find_device(struct Scsi_Host
*shost
,
40 int channel
, int pun
, int lun
) {
41 struct scsi_device
*sdev
;
43 list_for_each_entry (sdev
, &shost
->my_devices
, siblings
)
44 if (sdev
->channel
== channel
&& sdev
->id
== pun