libsas.h 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677
  1. /*
  2. * SAS host prototypes and structures header file
  3. *
  4. * Copyright (C) 2005 Adaptec, Inc. All rights reserved.
  5. * Copyright (C) 2005 Luben Tuikov <luben_tuikov@adaptec.com>
  6. *
  7. * This file is licensed under GPLv2.
  8. *
  9. * This program is free software; you can redistribute it and/or
  10. * modify it under the terms of the GNU General Public License as
  11. * published by the Free Software Foundation; either version 2 of the
  12. * License, or (at your option) any later version.
  13. *
  14. * This program is distributed in the hope that it will be useful, but
  15. * WITHOUT ANY WARRANTY; without even the implied warranty of
  16. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  17. * General Public License for more details.
  18. *
  19. * You should have received a copy of the GNU General Public License
  20. * along with this program; if not, write to the Free Software
  21. * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
  22. * USA
  23. *
  24. */
  25. #ifndef _LIBSAS_H_
  26. #define _LIBSAS_H_
  27. #include <linux/timer.h>
  28. #include <linux/pci.h>
  29. #include <scsi/sas.h>
  30. #include <linux/libata.h>
  31. #include <linux/list.h>
  32. #include <scsi/scsi_device.h>
  33. #include <scsi/scsi_cmnd.h>
  34. #include <scsi/scsi_transport_sas.h>
  35. #include <linux/scatterlist.h>
  36. #include <linux/slab.h>
  37. struct block_device;
  38. enum sas_class {
  39. SAS,
  40. EXPANDER
  41. };
  42. enum sas_phy_role {
  43. PHY_ROLE_NONE = 0,
  44. PHY_ROLE_TARGET = 0x40,
  45. PHY_ROLE_INITIATOR = 0x80,
  46. };
  47. enum sas_phy_type {
  48. PHY_TYPE_PHYSICAL,
  49. PHY_TYPE_VIRTUAL
  50. };
  51. /* The events are mnemonically described in sas_dump.c
  52. * so when updating/adding events here, please also
  53. * update the other file too.
  54. */
  55. enum ha_event {
  56. HAE_RESET = 0U,
  57. HA_NUM_EVENTS = 1,
  58. };
  59. enum port_event {
  60. PORTE_BYTES_DMAED = 0U,
  61. PORTE_BROADCAST_RCVD = 1,
  62. PORTE_LINK_RESET_ERR = 2,
  63. PORTE_TIMER_EVENT = 3,
  64. PORTE_HARD_RESET = 4,
  65. PORT_NUM_EVENTS = 5,
  66. };
  67. enum phy_event {
  68. PHYE_LOSS_OF_SIGNAL = 0U,
  69. PHYE_OOB_DONE = 1,
  70. PHYE_OOB_ERROR = 2,
  71. PHYE_SPINUP_HOLD = 3, /* hot plug SATA, no COMWAKE sent */
  72. PHY_NUM_EVENTS = 4,
  73. };
  74. enum discover_event {
  75. DISCE_DISCOVER_DOMAIN = 0U,
  76. DISCE_REVALIDATE_DOMAIN = 1,
  77. DISCE_PORT_GONE = 2,
  78. DISC_NUM_EVENTS = 3,
  79. };
  80. /* ---------- Expander Devices ---------- */
  81. #define to_dom_device(_obj) container_of(_obj, struct domain_device, dev_obj)
  82. #define to_dev_attr(_attr) container_of(_attr, struct domain_dev_attribute,\
  83. attr)
  84. enum routing_attribute {
  85. DIRECT_ROUTING,
  86. SUBTRACTIVE_ROUTING,
  87. TABLE_ROUTING,
  88. };
  89. enum ex_phy_state {
  90. PHY_EMPTY,
  91. PHY_VACANT,
  92. PHY_NOT_PRESENT,
  93. PHY_DEVICE_DISCOVERED
  94. };
  95. struct ex_phy {
  96. int phy_id;
  97. enum ex_phy_state phy_state;
  98. enum sas_dev_type attached_dev_type;
  99. enum sas_linkrate linkrate;
  100. u8 attached_sata_host:1;
  101. u8 attached_sata_dev:1;
  102. u8 attached_sata_ps:1;
  103. enum sas_protocol attached_tproto;
  104. enum sas_protocol attached_iproto;
  105. u8 attached_sas_addr[SAS_ADDR_SIZE];
  106. u8 attached_phy_id;
  107. u8 phy_change_count;
  108. enum routing_attribute routing_attr;
  109. u8 virtual:1;
  110. int last_da_index;
  111. struct sas_phy *phy;
  112. struct sas_port *port;
  113. };
  114. struct expander_device {
  115. struct list_head children;
  116. u16 ex_change_count;
  117. u16 max_route_indexes;
  118. u8 num_phys;
  119. u8 t2t_supp:1;
  120. u8 configuring:1;
  121. u8 conf_route_table:1;
  122. u8 enclosure_logical_id[8];
  123. struct ex_phy *ex_phy;
  124. struct sas_port *parent_port;
  125. };
  126. /* ---------- SATA device ---------- */
  127. enum ata_command_set {
  128. ATA_COMMAND_SET = 0,
  129. ATAPI_COMMAND_SET = 1,
  130. };
  131. struct sata_device {
  132. enum ata_command_set command_set;
  133. struct smp_resp rps_resp; /* report_phy_sata_resp */
  134. __le16 *identify_device;
  135. __le16 *identify_packet_device;
  136. u8 port_no; /* port number, if this is a PM (Port) */
  137. struct list_head children; /* PM Ports if this is a PM */
  138. struct ata_port *ap;
  139. struct ata_host ata_host;
  140. struct ata_taskfile tf;
  141. };
  142. enum {
  143. SAS_DEV_GONE,
  144. };
  145. struct domain_device {
  146. enum sas_dev_type dev_type;
  147. enum sas_linkrate linkrate;
  148. enum sas_linkrate min_linkrate;
  149. enum sas_linkrate max_linkrate;
  150. int pathways;
  151. struct domain_device *parent;
  152. struct list_head siblings; /* devices on the same level */
  153. struct asd_sas_port *port; /* shortcut to root of the tree */
  154. struct list_head dev_list_node;
  155. enum sas_protocol iproto;
  156. enum sas_protocol tproto;
  157. struct sas_rphy *rphy;
  158. u8 sas_addr[SAS_ADDR_SIZE];
  159. u8 hashed_sas_addr[HASHED_SAS_ADDR_SIZE];
  160. u8 frame_rcvd[32];
  161. union {
  162. struct expander_device ex_dev;
  163. struct sata_device sata_dev; /* STP & directly attached */
  164. };
  165. void *lldd_dev;
  166. unsigned long state;
  167. struct kref kref;
  168. };
  169. struct sas_discovery_event {
  170. struct work_struct work;
  171. struct asd_sas_port *port;
  172. };
  173. struct sas_discovery {
  174. struct sas_discovery_event disc_work[DISC_NUM_EVENTS];
  175. unsigned long pending;
  176. u8 fanout_sas_addr[8];
  177. u8 eeds_a[8];
  178. u8 eeds_b[8];
  179. int max_level;
  180. };
  181. /* The port struct is Class:RW, driver:RO */
  182. struct asd_sas_port {
  183. /* private: */
  184. struct completion port_gone_completion;
  185. struct sas_discovery disc;
  186. struct domain_device *port_dev;
  187. spinlock_t dev_list_lock;
  188. struct list_head dev_list;
  189. enum sas_linkrate linkrate;
  190. struct sas_phy *phy;
  191. struct work_struct work;
  192. /* public: */
  193. int id;
  194. enum sas_class class;
  195. u8 sas_addr[SAS_ADDR_SIZE];
  196. u8 attached_sas_addr[SAS_ADDR_SIZE];
  197. enum sas_protocol iproto;
  198. enum sas_protocol tproto;
  199. enum sas_oob_mode oob_mode;
  200. spinlock_t phy_list_lock;
  201. struct list_head phy_list;
  202. int num_phys;
  203. u32 phy_mask;
  204. struct sas_ha_struct *ha;
  205. struct sas_port *port;
  206. void *lldd_port; /* not touched by the sas class code */
  207. };
  208. struct asd_sas_event {
  209. struct work_struct work;
  210. struct asd_sas_phy *phy;
  211. };
  212. /* The phy pretty much is controlled by the LLDD.
  213. * The class only reads those fields.
  214. */
  215. struct asd_sas_phy {
  216. /* private: */
  217. struct asd_sas_event port_events[PORT_NUM_EVENTS];
  218. struct asd_sas_event phy_events[PHY_NUM_EVENTS];
  219. unsigned long port_events_pending;
  220. unsigned long phy_events_pending;
  221. int error;
  222. struct sas_phy *phy;
  223. /* public: */
  224. /* The following are class:RO, driver:R/W */
  225. int enabled; /* must be set */
  226. int id; /* must be set */
  227. enum sas_class class;
  228. enum sas_protocol iproto;
  229. enum sas_protocol tproto;
  230. enum sas_phy_type type;
  231. enum sas_phy_role role;
  232. enum sas_oob_mode oob_mode;
  233. enum sas_linkrate linkrate;
  234. u8 *sas_addr; /* must be set */
  235. u8 attached_sas_addr[SAS_ADDR_SIZE]; /* class:RO, driver: R/W */
  236. spinlock_t frame_rcvd_lock;
  237. u8 *frame_rcvd; /* must be set */
  238. int frame_rcvd_size;
  239. spinlock_t sas_prim_lock;
  240. u32 sas_prim;
  241. struct list_head port_phy_el; /* driver:RO */
  242. struct asd_sas_port *port; /* Class:RW, driver: RO */
  243. struct sas_ha_struct *ha; /* may be set; the class sets it anyway */
  244. void *lldd_phy; /* not touched by the sas_class_code */
  245. };
  246. struct scsi_core {
  247. struct Scsi_Host *shost;
  248. spinlock_t task_queue_lock;
  249. struct list_head task_queue;
  250. int task_queue_size;
  251. struct task_struct *queue_thread;
  252. };
  253. struct sas_ha_event {
  254. struct work_struct work;
  255. struct sas_ha_struct *ha;
  256. };
  257. enum sas_ha_state {
  258. SAS_HA_REGISTERED,
  259. SAS_HA_DRAINING,
  260. };
  261. struct sas_ha_struct {
  262. /* private: */
  263. struct sas_ha_event ha_events[HA_NUM_EVENTS];
  264. unsigned long pending;
  265. struct list_head defer_q; /* work queued while draining */
  266. struct mutex drain_mutex;
  267. unsigned long state;
  268. spinlock_t state_lock;
  269. struct scsi_core core;
  270. /* public: */
  271. char *sas_ha_name;
  272. struct device *dev; /* should be set */
  273. struct module *lldd_module; /* should be set */
  274. u8 *sas_addr; /* must be set */
  275. u8 hashed_sas_addr[HASHED_SAS_ADDR_SIZE];
  276. spinlock_t phy_port_lock;
  277. struct asd_sas_phy **sas_phy; /* array of valid pointers, must be set */
  278. struct asd_sas_port **sas_port; /* array of valid pointers, must be set */
  279. int num_phys; /* must be set, gt 0, static */
  280. /* The class calls this to send a task for execution. */
  281. int lldd_max_execute_num;
  282. int lldd_queue_size;
  283. int strict_wide_ports; /* both sas_addr and attached_sas_addr must match
  284. * their siblings when forming wide ports */
  285. /* LLDD calls these to notify the class of an event. */
  286. void (*notify_ha_event)(struct sas_ha_struct *, enum ha_event);
  287. void (*notify_port_event)(struct asd_sas_phy *, enum port_event);
  288. void (*notify_phy_event)(struct asd_sas_phy *, enum phy_event);
  289. void *lldd_ha; /* not touched by sas class code */
  290. struct list_head eh_done_q;
  291. };
  292. #define SHOST_TO_SAS_HA(_shost) (*(struct sas_ha_struct **)(_shost)->hostdata)
  293. static inline struct domain_device *
  294. starget_to_domain_dev(struct scsi_target *starget) {
  295. return starget->hostdata;
  296. }
  297. static inline struct domain_device *
  298. sdev_to_domain_dev(struct scsi_device *sdev) {
  299. return starget_to_domain_dev(sdev->sdev_target);
  300. }
  301. static inline struct ata_device *sas_to_ata_dev(struct domain_device *dev)
  302. {
  303. return &dev->sata_dev.ap->link.device[0];
  304. }
  305. static inline struct domain_device *
  306. cmd_to_domain_dev(struct scsi_cmnd *cmd)
  307. {
  308. return sdev_to_domain_dev(cmd->device);
  309. }
  310. void sas_hash_addr(u8 *hashed, const u8 *sas_addr);
  311. /* Before calling a notify event, LLDD should use this function
  312. * when the link is severed (possibly from its tasklet).
  313. * The idea is that the Class only reads those, while the LLDD,
  314. * can R/W these (thus avoiding a race).
  315. */
  316. static inline void sas_phy_disconnected(struct asd_sas_phy *phy)
  317. {
  318. phy->oob_mode = OOB_NOT_CONNECTED;
  319. phy->linkrate = SAS_LINK_RATE_UNKNOWN;
  320. }
  321. static inline unsigned int to_sas_gpio_od(int device, int bit)
  322. {
  323. return 3 * device + bit;
  324. }
  325. #ifdef CONFIG_SCSI_SAS_HOST_SMP
  326. int try_test_sas_gpio_gp_bit(unsigned int od, u8 *data, u8 index, u8 count);
  327. #else
  328. static inline int try_test_sas_gpio_gp_bit(unsigned int od, u8 *data, u8 index, u8 count)
  329. {
  330. return -1;
  331. }
  332. #endif
  333. /* ---------- Tasks ---------- */
  334. /*
  335. service_response | SAS_TASK_COMPLETE | SAS_TASK_UNDELIVERED |
  336. exec_status | | |
  337. ---------------------+---------------------+-----------------------+
  338. SAM_... | X | |
  339. DEV_NO_RESPONSE | X | X |
  340. INTERRUPTED | X | |
  341. QUEUE_FULL | | X |
  342. DEVICE_UNKNOWN | | X |
  343. SG_ERR | | X |
  344. ---------------------+---------------------+-----------------------+
  345. */
  346. enum service_response {
  347. SAS_TASK_COMPLETE,
  348. SAS_TASK_UNDELIVERED = -1,
  349. };
  350. enum exec_status {
  351. /* The SAM_STAT_.. codes fit in the lower 6 bits */
  352. SAS_DEV_NO_RESPONSE = 0x80,
  353. SAS_DATA_UNDERRUN,
  354. SAS_DATA_OVERRUN,
  355. SAS_INTERRUPTED,
  356. SAS_QUEUE_FULL,
  357. SAS_DEVICE_UNKNOWN,
  358. SAS_SG_ERR,
  359. SAS_OPEN_REJECT,
  360. SAS_OPEN_TO,
  361. SAS_PROTO_RESPONSE,
  362. SAS_PHY_DOWN,
  363. SAS_NAK_R_ERR,
  364. SAS_PENDING,
  365. SAS_ABORTED_TASK,
  366. };
  367. /* When a task finishes with a response, the LLDD examines the
  368. * response:
  369. * - For an ATA task task_status_struct::stat is set to
  370. * SAS_PROTO_RESPONSE, and the task_status_struct::buf is set to the
  371. * contents of struct ata_task_resp.
  372. * - For SSP tasks, if no data is present or status/TMF response
  373. * is valid, task_status_struct::stat is set. If data is present
  374. * (SENSE data), the LLDD copies up to SAS_STATUS_BUF_SIZE, sets
  375. * task_status_struct::buf_valid_size, and task_status_struct::stat is
  376. * set to SAM_CHECK_COND.
  377. *
  378. * "buf" has format SCSI Sense for SSP task, or struct ata_task_resp
  379. * for ATA task.
  380. *
  381. * "frame_len" is the total frame length, which could be more or less
  382. * than actually copied.
  383. *
  384. * Tasks ending with response, always set the residual field.
  385. */
  386. struct ata_task_resp {
  387. u16 frame_len;
  388. u8 ending_fis[24]; /* dev to host or data-in */
  389. };
  390. #define SAS_STATUS_BUF_SIZE 96
  391. struct task_status_struct {
  392. enum service_response resp;
  393. enum exec_status stat;
  394. int buf_valid_size;
  395. u8 buf[SAS_STATUS_BUF_SIZE];
  396. u32 residual;
  397. enum sas_open_rej_reason open_rej_reason;
  398. };
  399. /* ATA and ATAPI task queuable to a SAS LLDD.
  400. */
  401. struct sas_ata_task {
  402. struct host_to_dev_fis fis;
  403. u8 atapi_packet[16]; /* 0 if not ATAPI task */
  404. u8 retry_count; /* hardware retry, should be > 0 */
  405. u8 dma_xfer:1; /* PIO:0 or DMA:1 */
  406. u8 use_ncq:1;
  407. u8 set_affil_pol:1;
  408. u8 stp_affil_pol:1;
  409. u8 device_control_reg_update:1;
  410. };
  411. struct sas_smp_task {
  412. struct scatterlist smp_req;
  413. struct scatterlist smp_resp;
  414. };
  415. enum task_attribute {
  416. TASK_ATTR_SIMPLE = 0,
  417. TASK_ATTR_HOQ = 1,
  418. TASK_ATTR_ORDERED= 2,
  419. TASK_ATTR_ACA = 4,
  420. };
  421. struct sas_ssp_task {
  422. u8 retry_count; /* hardware retry, should be > 0 */
  423. u8 LUN[8];
  424. u8 enable_first_burst:1;
  425. enum task_attribute task_attr;
  426. u8 task_prio;
  427. u8 cdb[16];
  428. };
  429. struct sas_task {
  430. struct domain_device *dev;
  431. struct list_head list;
  432. spinlock_t task_state_lock;
  433. unsigned task_state_flags;
  434. enum sas_protocol task_proto;
  435. /* Used by the discovery code. */
  436. struct timer_list timer;
  437. struct completion completion;
  438. union {
  439. struct sas_ata_task ata_task;
  440. struct sas_smp_task smp_task;
  441. struct sas_ssp_task ssp_task;
  442. };
  443. struct scatterlist *scatter;
  444. int num_scatter;
  445. u32 total_xfer_len;
  446. u8 data_dir:2; /* Use PCI_DMA_... */
  447. struct task_status_struct task_status;
  448. void (*task_done)(struct sas_task *);
  449. void *lldd_task; /* for use by LLDDs */
  450. void *uldd_task;
  451. struct work_struct abort_work;
  452. };
  453. #define SAS_TASK_STATE_PENDING 1
  454. #define SAS_TASK_STATE_DONE 2
  455. #define SAS_TASK_STATE_ABORTED 4
  456. #define SAS_TASK_NEED_DEV_RESET 8
  457. #define SAS_TASK_AT_INITIATOR 16
  458. extern struct sas_task *sas_alloc_task(gfp_t flags);
  459. extern void sas_free_task(struct sas_task *task);
  460. struct sas_domain_function_template {
  461. /* The class calls these to notify the LLDD of an event. */
  462. void (*lldd_port_formed)(struct asd_sas_phy *);
  463. void (*lldd_port_deformed)(struct asd_sas_phy *);
  464. /* The class calls these when a device is found or gone. */
  465. int (*lldd_dev_found)(struct domain_device *);
  466. void (*lldd_dev_gone)(struct domain_device *);
  467. int (*lldd_execute_task)(struct sas_task *, int num,
  468. gfp_t gfp_flags);
  469. /* Task Management Functions. Must be called from process context. */
  470. int (*lldd_abort_task)(struct sas_task *);
  471. int (*lldd_abort_task_set)(struct domain_device *, u8 *lun);
  472. int (*lldd_clear_aca)(struct domain_device *, u8 *lun);
  473. int (*lldd_clear_task_set)(struct domain_device *, u8 *lun);
  474. int (*lldd_I_T_nexus_reset)(struct domain_device *);
  475. int (*lldd_ata_soft_reset)(struct domain_device *);
  476. int (*lldd_lu_reset)(struct domain_device *, u8 *lun);
  477. int (*lldd_query_task)(struct sas_task *);
  478. /* Port and Adapter management */
  479. int (*lldd_clear_nexus_port)(struct asd_sas_port *);
  480. int (*lldd_clear_nexus_ha)(struct sas_ha_struct *);
  481. /* Phy management */
  482. int (*lldd_control_phy)(struct asd_sas_phy *, enum phy_func, void *);
  483. /* GPIO support */
  484. int (*lldd_write_gpio)(struct sas_ha_struct *, u8 reg_type,
  485. u8 reg_index, u8 reg_count, u8 *write_data);
  486. };
  487. extern int sas_register_ha(struct sas_ha_struct *);
  488. extern int sas_unregister_ha(struct sas_ha_struct *);
  489. int sas_set_phy_speed(struct sas_phy *phy,
  490. struct sas_phy_linkrates *rates);
  491. int sas_phy_enable(struct sas_phy *phy, int enabled);
  492. int sas_phy_reset(struct sas_phy *phy, int hard_reset);
  493. int sas_queue_up(struct sas_task *task);
  494. extern int sas_queuecommand(struct Scsi_Host * ,struct scsi_cmnd *);
  495. extern int sas_target_alloc(struct scsi_target *);
  496. extern int sas_slave_alloc(struct scsi_device *);
  497. extern int sas_slave_configure(struct scsi_device *);
  498. extern int sas_change_queue_depth(struct scsi_device *, int new_depth,
  499. int reason);
  500. extern int sas_change_queue_type(struct scsi_device *, int qt);
  501. extern int sas_bios_param(struct scsi_device *,
  502. struct block_device *,
  503. sector_t capacity, int *hsc);
  504. extern struct scsi_transport_template *
  505. sas_domain_attach_transport(struct sas_domain_function_template *);
  506. extern void sas_domain_release_transport(struct scsi_transport_template *);
  507. int sas_discover_root_expander(struct domain_device *);
  508. void sas_init_ex_attr(void);
  509. int sas_ex_revalidate_domain(struct domain_device *);
  510. void sas_unregister_domain_devices(struct asd_sas_port *port);
  511. void sas_init_disc(struct sas_discovery *disc, struct asd_sas_port *);
  512. int sas_discover_event(struct asd_sas_port *, enum discover_event ev);
  513. int sas_discover_sata(struct domain_device *);
  514. int sas_discover_end_dev(struct domain_device *);
  515. void sas_unregister_dev(struct asd_sas_port *port, struct domain_device *);
  516. void sas_init_dev(struct domain_device *);
  517. void sas_task_abort(struct sas_task *);
  518. int __sas_task_abort(struct sas_task *);
  519. int sas_eh_device_reset_handler(struct scsi_cmnd *cmd);
  520. int sas_eh_bus_reset_handler(struct scsi_cmnd *cmd);
  521. extern void sas_target_destroy(struct scsi_target *);
  522. extern int sas_slave_alloc(struct scsi_device *);
  523. extern int sas_ioctl(struct scsi_device *sdev, int cmd, void __user *arg);
  524. extern int sas_drain_work(struct sas_ha_struct *ha);
  525. extern int sas_smp_handler(struct Scsi_Host *shost, struct sas_rphy *rphy,
  526. struct request *req);
  527. extern void sas_ssp_task_response(struct device *dev, struct sas_task *task,
  528. struct ssp_response_iu *iu);
  529. struct sas_phy *sas_find_local_phy(struct domain_device *dev);
  530. int sas_request_addr(struct Scsi_Host *shost, u8 *addr);
  531. #endif /* _SASLIB_H_ */