Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 20c3d7f7 authored by Cho, Yu-Chen's avatar Cho, Yu-Chen Committed by Greg Kroah-Hartman
Browse files

Staging: Remove ENE UB6250 MS card codes from keucr



Remove ENE UB6250 MS card codes from keucr.

Signed-off-by: default avatarCho, Yu-Chen <acho@novell.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 33842ced
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
config USB_ENESTORAGE
	tristate "USB ENE SM/MS card reader support"
	tristate "USB ENE SM card reader support"
	depends on USB && SCSI && m
	---help---
	  Say Y here if you wish to control a ENE SM/MS Card reader.
	  To use SD card, please build driver/usb/storage/ums-eneub6250.ko
	  Say Y here if you wish to control a ENE SM Card reader.
	  To use SD/MS card, please build driver/usb/storage/ums-eneub6250.ko

	  This option depends on 'SCSI' support being enabled, but you
	  probably also need 'SCSI device support: SCSI disk support'
+0 −2
Original line number Diff line number Diff line
@@ -7,8 +7,6 @@ keucr-y := \
		scsiglue.o	\
		transport.o	\
		init.o		\
		msscsi.o	\
		ms.o		\
		smscsi.o	\
		smilmain.o	\
		smilsub.o	\
+1 −70
Original line number Diff line number Diff line
@@ -31,8 +31,6 @@ int ENE_InitMedia(struct us_data *us)
		if (!us->SM_Status.Ready && !us->MS_Status.Ready) {
			result = ENE_SMInit(us);
			if (result != USB_STOR_XFER_GOOD) {
				result = ENE_MSInit(us);
				if (result != USB_STOR_XFER_GOOD)
				return USB_STOR_TRANSPORT_ERROR;
			}
		}
@@ -61,60 +59,6 @@ int ENE_Read_BYTE(struct us_data *us, WORD index, void *buf)
	return result;
}

/*
 * ENE_MSInit():
 */
int ENE_MSInit(struct us_data *us)
{
	struct bulk_cb_wrap *bcb = (struct bulk_cb_wrap *) us->iobuf;
	int	result;
	BYTE	buf[0x200];
	WORD	MSP_BlockSize, MSP_UserAreaBlocks;

	printk(KERN_INFO "transport --- ENE_MSInit\n");
	result = ENE_LoadBinCode(us, MS_INIT_PATTERN);
	if (result != USB_STOR_XFER_GOOD) {
		printk(KERN_ERR "Load MS Init Code Fail !!\n");
		return USB_STOR_TRANSPORT_ERROR;
	}

	memset(bcb, 0, sizeof(struct bulk_cb_wrap));
	bcb->Signature = cpu_to_le32(US_BULK_CB_SIGN);
	bcb->DataTransferLength	= 0x200;
	bcb->Flags			= 0x80;
	bcb->CDB[0]			= 0xF1;
	bcb->CDB[1]			= 0x01;

	result = ENE_SendScsiCmd(us, FDIR_READ, &buf, 0);
	if (result != USB_STOR_XFER_GOOD) {
		printk(KERN_ERR "Execution MS Init Code Fail !!\n");
		return USB_STOR_TRANSPORT_ERROR;
	}

	us->MS_Status = *(PMS_STATUS)&buf[0];

	if (us->MS_Status.Insert && us->MS_Status.Ready) {
		printk(KERN_INFO "Insert     = %x\n", us->MS_Status.Insert);
		printk(KERN_INFO "Ready      = %x\n", us->MS_Status.Ready);
		printk(KERN_INFO "IsMSPro    = %x\n", us->MS_Status.IsMSPro);
		printk(KERN_INFO "IsMSPHG    = %x\n", us->MS_Status.IsMSPHG);
		printk(KERN_INFO "WtP        = %x\n", us->MS_Status.WtP);
		if (us->MS_Status.IsMSPro) {
			MSP_BlockSize      = (buf[6] << 8) | buf[7];
			MSP_UserAreaBlocks = (buf[10] << 8) | buf[11];
			us->MSP_TotalBlock = MSP_BlockSize * MSP_UserAreaBlocks;
		} else {
			MS_CardInit(us);
		}
		printk(KERN_INFO "MS Init Code OK !!\n");
	} else {
		printk(KERN_INFO "MS Card Not Ready --- %x\n", buf[0]);
		return USB_STOR_TRANSPORT_ERROR;
	}

	return USB_STOR_TRANSPORT_GOOD;
}

/*
 *ENE_SMInit()
 */
@@ -185,19 +129,6 @@ int ENE_LoadBinCode(struct us_data *us, BYTE flag)
	if (buf == NULL)
		return USB_STOR_TRANSPORT_ERROR;
	switch (flag) {
	/* For MS */
	case MS_INIT_PATTERN:
		printk(KERN_INFO "MS_INIT_PATTERN\n");
		memcpy(buf, MS_Init, 0x800);
		break;
	case MSP_RW_PATTERN:
		printk(KERN_INFO "MSP_RW_PATTERN\n");
		memcpy(buf, MSP_Rdwr, 0x800);
		break;
	case MS_RW_PATTERN:
		printk(KERN_INFO "MS_RW_PATTERN\n");
		memcpy(buf, MS_Rdwr, 0x800);
		break;
	/* For SS */
	case SM_INIT_PATTERN:
		printk(KERN_INFO "SM_INIT_PATTERN\n");
+0 −773

File changed.

Preview size limit exceeded, changes collapsed.

drivers/staging/keucr/ms.c

deleted100644 → 0
+0 −1034

File deleted.

Preview size limit exceeded, changes collapsed.

Loading