• Home
  • Raw
  • Download

Lines Matching refs:sdev

119 static int trespass_endio(struct scsi_device *sdev, char *sense)  in trespass_endio()  argument
125 sdev_printk(KERN_ERR, sdev, "%s: Found valid sense data 0x%2x, " in trespass_endio()
136 sdev_printk(KERN_INFO, sdev, "%s: Array Based Copy in " in trespass_endio()
146 sdev_printk(KERN_INFO, sdev, "%s: Detected in-progress " in trespass_endio()
153 sdev_printk(KERN_INFO, sdev, in trespass_endio()
160 static int parse_sp_info_reply(struct scsi_device *sdev, in parse_sp_info_reply() argument
167 sdev_printk(KERN_NOTICE, sdev, "%s: Detected in-progress " in parse_sp_info_reply()
175 sdev_printk(KERN_NOTICE, sdev, in parse_sp_info_reply()
183 sdev_printk(KERN_NOTICE, sdev, in parse_sp_info_reply()
191 sdev_printk(KERN_WARNING, sdev, in parse_sp_info_reply()
203 sdev->access_state = SCSI_ACCESS_STATE_OPTIMAL; in parse_sp_info_reply()
205 sdev->access_state = SCSI_ACCESS_STATE_STANDBY; in parse_sp_info_reply()
207 sdev->access_state |= SCSI_ACCESS_STATE_PREFERRED; in parse_sp_info_reply()
214 static char * parse_sp_model(struct scsi_device *sdev, unsigned char *buffer) in parse_sp_model() argument
221 sdev_printk(KERN_WARNING, sdev, in parse_sp_model()
237 sdev_printk(KERN_WARNING, sdev, in parse_sp_model()
244 sdev_printk(KERN_WARNING, sdev, in parse_sp_model()
267 static struct request *get_req(struct scsi_device *sdev, int cmd, in get_req() argument
273 rq = blk_get_request(sdev->request_queue, in get_req()
276 sdev_printk(KERN_INFO, sdev, "get_req: blk_get_request failed"); in get_req()
318 static int send_inquiry_cmd(struct scsi_device *sdev, int page, in send_inquiry_cmd() argument
321 struct request *rq = get_req(sdev, INQUIRY, csdev->buffer); in send_inquiry_cmd()
336 err = blk_execute_rq(sdev->request_queue, NULL, rq, 1); in send_inquiry_cmd()
338 sdev_printk(KERN_INFO, sdev, in send_inquiry_cmd()
351 static int send_trespass_cmd(struct scsi_device *sdev, in send_trespass_cmd() argument
376 rq = get_req(sdev, cmd, csdev->buffer); in send_trespass_cmd()
384 err = blk_execute_rq(sdev->request_queue, NULL, rq, 1); in send_trespass_cmd()
387 err = trespass_endio(sdev, csdev->sense); in send_trespass_cmd()
389 sdev_printk(KERN_INFO, sdev, in send_trespass_cmd()
400 static int clariion_check_sense(struct scsi_device *sdev, in clariion_check_sense() argument
448 static int clariion_prep_fn(struct scsi_device *sdev, struct request *req) in clariion_prep_fn() argument
450 struct clariion_dh_data *h = sdev->handler_data; in clariion_prep_fn()
461 static int clariion_std_inquiry(struct scsi_device *sdev, in clariion_std_inquiry() argument
467 err = send_inquiry_cmd(sdev, 0, csdev); in clariion_std_inquiry()
473 sdev_printk(KERN_ERR, sdev, "%s: INQUIRY sense code " in clariion_std_inquiry()
481 sp_model = parse_sp_model(sdev, csdev->buffer); in clariion_std_inquiry()
493 sdev_printk(KERN_INFO, sdev, in clariion_std_inquiry()
500 static int clariion_send_inquiry(struct scsi_device *sdev, in clariion_send_inquiry() argument
506 err = send_inquiry_cmd(sdev, 0xC0, csdev); in clariion_send_inquiry()
515 err = clariion_check_sense(sdev, &sshdr); in clariion_send_inquiry()
520 sdev_printk(KERN_ERR, sdev, "%s: INQUIRY sense code " in clariion_send_inquiry()
525 err = parse_sp_info_reply(sdev, csdev); in clariion_send_inquiry()
530 static int clariion_activate(struct scsi_device *sdev, in clariion_activate() argument
533 struct clariion_dh_data *csdev = sdev->handler_data; in clariion_activate()
536 result = clariion_send_inquiry(sdev, csdev); in clariion_activate()
543 result = send_trespass_cmd(sdev, csdev); in clariion_activate()
546 sdev_printk(KERN_INFO, sdev,"%s: %s trespass command sent\n", in clariion_activate()
551 result = clariion_send_inquiry(sdev, csdev); in clariion_activate()
556 sdev_printk(KERN_INFO, sdev, in clariion_activate()
572 static int clariion_set_params(struct scsi_device *sdev, const char *params) in clariion_set_params() argument
574 struct clariion_dh_data *csdev = sdev->handler_data; in clariion_set_params()
611 result = send_trespass_cmd(sdev, csdev); in clariion_set_params()
616 result = clariion_send_inquiry(sdev, csdev); in clariion_set_params()
622 static int clariion_bus_attach(struct scsi_device *sdev) in clariion_bus_attach() argument
634 err = clariion_std_inquiry(sdev, h); in clariion_bus_attach()
638 err = clariion_send_inquiry(sdev, h); in clariion_bus_attach()
642 sdev_printk(KERN_INFO, sdev, in clariion_bus_attach()
648 sdev->handler_data = h; in clariion_bus_attach()
656 static void clariion_bus_detach(struct scsi_device *sdev) in clariion_bus_detach() argument
658 kfree(sdev->handler_data); in clariion_bus_detach()
659 sdev->handler_data = NULL; in clariion_bus_detach()