Lines Matching refs:sdev

46 	struct scsi_device *sdev;  member
53 static inline struct hp_sw_dh_data *get_hp_sw_data(struct scsi_device *sdev) in get_hp_sw_data() argument
55 return container_of(sdev->scsi_dh_data, struct hp_sw_dh_data, dh_data); in get_hp_sw_data()
65 static int tur_done(struct scsi_device *sdev, unsigned char *sense) in tur_done() argument
72 sdev_printk(KERN_WARNING, sdev, in tur_done()
94 sdev_printk(KERN_WARNING, sdev, in tur_done()
112 static int hp_sw_tur(struct scsi_device *sdev, struct hp_sw_dh_data *h) in hp_sw_tur() argument
118 req = blk_get_request(sdev->request_queue, WRITE, GFP_NOIO); in hp_sw_tur()
135 ret = tur_done(sdev, h->sense); in hp_sw_tur()
137 sdev_printk(KERN_WARNING, sdev, in hp_sw_tur()
165 static int start_done(struct scsi_device *sdev, unsigned char *sense) in start_done() argument
172 sdev_printk(KERN_WARNING, sdev, in start_done()
191 sdev_printk(KERN_WARNING, sdev, in start_done()
208 sdev_printk(KERN_WARNING, h->sdev, in start_stop_endio()
216 err = start_done(h->sdev, h->sense); in start_stop_endio()
248 req = blk_get_request(h->sdev->request_queue, WRITE, GFP_ATOMIC); in hp_sw_start_stop()
268 static int hp_sw_prep_fn(struct scsi_device *sdev, struct request *req) in hp_sw_prep_fn() argument
270 struct hp_sw_dh_data *h = get_hp_sw_data(sdev); in hp_sw_prep_fn()
291 static int hp_sw_activate(struct scsi_device *sdev, in hp_sw_activate() argument
295 struct hp_sw_dh_data *h = get_hp_sw_data(sdev); in hp_sw_activate()
297 ret = hp_sw_tur(sdev, h); in hp_sw_activate()
325 static bool hp_sw_match(struct scsi_device *sdev) in hp_sw_match() argument
329 if (scsi_device_tpgs(sdev)) in hp_sw_match()
333 if (!strncmp(sdev->vendor, hp_sw_dh_data_list[i].vendor, in hp_sw_match()
335 !strncmp(sdev->model, hp_sw_dh_data_list[i].model, in hp_sw_match()
343 static struct scsi_dh_data *hp_sw_bus_attach(struct scsi_device *sdev) in hp_sw_bus_attach() argument
353 h->sdev = sdev; in hp_sw_bus_attach()
355 ret = hp_sw_tur(sdev, h); in hp_sw_bus_attach()
359 sdev_printk(KERN_INFO, sdev, "%s: attached to %s path\n", in hp_sw_bus_attach()
368 static void hp_sw_bus_detach( struct scsi_device *sdev ) in hp_sw_bus_detach() argument
370 struct hp_sw_dh_data *h = get_hp_sw_data(sdev); in hp_sw_bus_detach()