07.06.2013 Views

Scsi - Index of

Scsi - Index of

Scsi - Index of

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

341 }<br />

342<br />

343 /* reject if target != 0 or if LUN is higher than<br />

344 * the maximum known LUN<br />

345 */<br />

346 else if (us->srb->device->id &&<br />

347 !(us->flags & US_FL_SCM_MULT_TARG)) {<br />

348 US_DEBUGP("Bad target number (%d:%d)\n",<br />

349 us->srb->device->id, us->srb->device->lun);<br />

350 us->srb->result = DID_BAD_TARGET srb->device->lun > us->max_lun) {<br />

354 US_DEBUGP("Bad LUN (%d:%d)\n",<br />

355 us->srb->device->id, us->srb->device->lun);<br />

356 us->srb->result = DID_BAD_TARGET srb->cmnd[0] == INQUIRY) &&<br />

362 (us->flags & US_FL_FIX_INQUIRY)) {<br />

363 unsigned char data_ptr[36] = {<br />

364 0x00, 0x80, 0x02, 0x02,<br />

365 0x1F, 0x00, 0x00, 0x00};<br />

366<br />

367 US_DEBUGP("Faking INQUIRY command\n");<br />

368 fill_inquiry_response(us, data_ptr, 36);<br />

369 us->srb->result = SAM_STAT_GOOD;<br />

370 }<br />

371<br />

372 /* we've got a command, let's do it! */<br />

373 else {<br />

374 US_DEBUG(usb_stor_show_command(us->srb));<br />

375 us->proto_handler(us->srb, us);<br />

376 }<br />

377<br />

378 /* lock access to the state */<br />

379 scsi_lock(host);<br />

380<br />

381 /* indicate that the command is done */<br />

382 if (us->srb->result != DID_ABORT

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!