bcb->Lun = 0;			/* No multi-LUN yet */ 
bcb->Lun = (cmd->lun != NULL) ? cmd->lun->num : 0; 
static int ub_scsi_cmd_start(struct ub_dev *sc, struct ub_scsi_cmd *cmd){	struct bulk_cb_wrap *bcb;	int rc;	bcb = &sc->work_bcb;	/*	 * ``If the allocation length is eighteen or greater, and a device	 * server returns less than eithteen bytes of data, the application	 * client should assume that the bytes not transferred would have been	 * zeroes had the device server returned those bytes.''	 *	 * We zero sense for all commands so that when a packet request	 * fails it does not return a stale sense.	 */	memset(&sc->top_sense, 0, UB_SENSE_SIZE);	/* set up the command wrapper */	bcb->Signature = cpu_to_le32(US_BULK_CB_SIGN);	bcb->Tag = cmd->tag;		/* Endianness is not important */	bcb->DataTransferLength = cpu_to_le32(cmd->len);	bcb->Flags = (cmd->dir == UB_DIR_READ) ? 0x80 : 0;	bcb->Lun = 0;			/* No multi-LUN yet */	bcb->Length = cmd->cdb_len;	/* copy the command payload */	memcpy(bcb->CDB, cmd->cdb, UB_MAX_CDB_SIZE);	UB_INIT_COMPLETION(sc->work_done);	sc->last_pipe = sc->send_bulk_pipe;	usb_fill_bulk_urb(&sc->work_urb, sc->dev, sc->send_bulk_pipe,	    bcb, US_BULK_CB_WRAP_LEN, ub_urb_complete, sc);	sc->work_urb.transfer_flags = URB_ASYNC_UNLINK;	/* Fill what we shouldn't be filling, because usb-storage did so. */	sc->work_urb.actual_length = 0;	sc->work_urb.error_count = 0;	sc->work_urb.status = 0;	if ((rc = usb_submit_urb(&sc->work_urb, GFP_ATOMIC)) != 0) {		/* XXX Clear stalls */		printk("ub: cmd #%d start failed (%d)\n", cmd->tag, rc); /* P3 */		ub_complete(&sc->work_done);		return rc;	}	sc->work_timer.expires = jiffies + UB_URB_TIMEOUT;	add_timer(&sc->work_timer);	cmd->state = UB_CMDST_CMD;	ub_cmdtr_state(sc, cmd);	return 0;}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/f4800078d9ed4bd20b1b27f56e7b68cfa0d73038/ub.c/clean/drivers/block/ub.c