Commit 6fbb90bf authored by Laura Lawniczak's avatar Laura Lawniczak Committed by Greg Kroah-Hartman

keucr: more readable and friendly error messages

Signed-off-by: default avatarLaura Lawniczak <laura.lawniczak@googlemail.com>
Signed-off-by: default avatarJohannes Schilling <of82ecuq@cip.cs.fau.de>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 29b31420
...@@ -22,7 +22,7 @@ int ENE_InitMedia(struct us_data *us) ...@@ -22,7 +22,7 @@ int ENE_InitMedia(struct us_data *us)
dev_info(&us->pusb_dev->dev, "--- Init Media ---\n"); dev_info(&us->pusb_dev->dev, "--- Init Media ---\n");
result = ene_read_byte(us, REG_CARD_STATUS, &MiscReg03); result = ene_read_byte(us, REG_CARD_STATUS, &MiscReg03);
if (result != USB_STOR_XFER_GOOD) { if (result != USB_STOR_XFER_GOOD) {
dev_err(&us->pusb_dev->dev, "Read register fail !!\n"); dev_err(&us->pusb_dev->dev, "Failed to read register\n");
return USB_STOR_TRANSPORT_ERROR; return USB_STOR_TRANSPORT_ERROR;
} }
dev_info(&us->pusb_dev->dev, "MiscReg03 = %x\n", MiscReg03); dev_info(&us->pusb_dev->dev, "MiscReg03 = %x\n", MiscReg03);
...@@ -71,7 +71,9 @@ int ENE_SMInit(struct us_data *us) ...@@ -71,7 +71,9 @@ int ENE_SMInit(struct us_data *us)
result = ENE_LoadBinCode(us, SM_INIT_PATTERN); result = ENE_LoadBinCode(us, SM_INIT_PATTERN);
if (result != USB_STOR_XFER_GOOD) { if (result != USB_STOR_XFER_GOOD) {
dev_info(&us->pusb_dev->dev, "Load SM Init Code Fail !!\n"); dev_info(&us->pusb_dev->dev,
"Failed to load SmartMedia init code\n: result= %x\n",
result);
return USB_STOR_TRANSPORT_ERROR; return USB_STOR_TRANSPORT_ERROR;
} }
...@@ -84,7 +86,9 @@ int ENE_SMInit(struct us_data *us) ...@@ -84,7 +86,9 @@ int ENE_SMInit(struct us_data *us)
result = ENE_SendScsiCmd(us, FDIR_READ, &buf, 0); result = ENE_SendScsiCmd(us, FDIR_READ, &buf, 0);
if (result != USB_STOR_XFER_GOOD) { if (result != USB_STOR_XFER_GOOD) {
dev_err(&us->pusb_dev->dev, "Execution SM Init Code Fail !! result = %x\n", result); dev_err(&us->pusb_dev->dev,
"Failed to load SmartMedia init code: result = %x\n",
result);
return USB_STOR_TRANSPORT_ERROR; return USB_STOR_TRANSPORT_ERROR;
} }
...@@ -102,7 +106,8 @@ int ENE_SMInit(struct us_data *us) ...@@ -102,7 +106,8 @@ int ENE_SMInit(struct us_data *us)
MediaChange = 1; MediaChange = 1;
Check_D_MediaFmt(us); Check_D_MediaFmt(us);
} else { } else {
dev_err(&us->pusb_dev->dev, "SM Card Not Ready --- %x\n", buf[0]); dev_err(&us->pusb_dev->dev,
"SmartMedia Card Not Ready --- %x\n", buf[0]);
return USB_STOR_TRANSPORT_ERROR; return USB_STOR_TRANSPORT_ERROR;
} }
......
...@@ -214,7 +214,8 @@ int Ssfdc_D_ReadSect(struct us_data *us, BYTE *buf, BYTE *redundant) ...@@ -214,7 +214,8 @@ int Ssfdc_D_ReadSect(struct us_data *us, BYTE *buf, BYTE *redundant)
result = ENE_LoadBinCode(us, SM_RW_PATTERN); result = ENE_LoadBinCode(us, SM_RW_PATTERN);
if (result != USB_STOR_XFER_GOOD) { if (result != USB_STOR_XFER_GOOD) {
dev_err(&us->pusb_dev->dev, "Load SM RW Code Fail !!\n"); dev_err(&us->pusb_dev->dev,
"Failed to load SmartMedia read/write code\n");
return USB_STOR_TRANSPORT_ERROR; return USB_STOR_TRANSPORT_ERROR;
} }
...@@ -266,7 +267,8 @@ int Ssfdc_D_ReadBlock(struct us_data *us, WORD count, BYTE *buf, ...@@ -266,7 +267,8 @@ int Ssfdc_D_ReadBlock(struct us_data *us, WORD count, BYTE *buf,
result = ENE_LoadBinCode(us, SM_RW_PATTERN); result = ENE_LoadBinCode(us, SM_RW_PATTERN);
if (result != USB_STOR_XFER_GOOD) { if (result != USB_STOR_XFER_GOOD) {
dev_err(&us->pusb_dev->dev, "Load SM RW Code Fail !!\n"); dev_err(&us->pusb_dev->dev,
"Failed to load SmartMedia read/write code\n");
return USB_STOR_TRANSPORT_ERROR; return USB_STOR_TRANSPORT_ERROR;
} }
...@@ -319,7 +321,8 @@ int Ssfdc_D_CopyBlock(struct us_data *us, WORD count, BYTE *buf, ...@@ -319,7 +321,8 @@ int Ssfdc_D_CopyBlock(struct us_data *us, WORD count, BYTE *buf,
result = ENE_LoadBinCode(us, SM_RW_PATTERN); result = ENE_LoadBinCode(us, SM_RW_PATTERN);
if (result != USB_STOR_XFER_GOOD) { if (result != USB_STOR_XFER_GOOD) {
dev_err(&us->pusb_dev->dev, "Load SM RW Code Fail !!\n"); dev_err(&us->pusb_dev->dev,
"Failed to load SmartMedia read/write code\n");
return USB_STOR_TRANSPORT_ERROR; return USB_STOR_TRANSPORT_ERROR;
} }
...@@ -365,7 +368,8 @@ int Ssfdc_D_WriteSectForCopy(struct us_data *us, BYTE *buf, BYTE *redundant) ...@@ -365,7 +368,8 @@ int Ssfdc_D_WriteSectForCopy(struct us_data *us, BYTE *buf, BYTE *redundant)
result = ENE_LoadBinCode(us, SM_RW_PATTERN); result = ENE_LoadBinCode(us, SM_RW_PATTERN);
if (result != USB_STOR_XFER_GOOD) { if (result != USB_STOR_XFER_GOOD) {
dev_err(&us->pusb_dev->dev, "Load SM RW Code Fail !!\n"); dev_err(&us->pusb_dev->dev,
"Failed to load SmartMedia read/write code\n");
return USB_STOR_TRANSPORT_ERROR; return USB_STOR_TRANSPORT_ERROR;
} }
...@@ -403,7 +407,8 @@ int Ssfdc_D_EraseBlock(struct us_data *us) ...@@ -403,7 +407,8 @@ int Ssfdc_D_EraseBlock(struct us_data *us)
result = ENE_LoadBinCode(us, SM_RW_PATTERN); result = ENE_LoadBinCode(us, SM_RW_PATTERN);
if (result != USB_STOR_XFER_GOOD) { if (result != USB_STOR_XFER_GOOD) {
dev_err(&us->pusb_dev->dev, "Load SM RW Code Fail !!\n"); dev_err(&us->pusb_dev->dev,
"Failed to load SmartMedia read/write code\n");
return USB_STOR_TRANSPORT_ERROR; return USB_STOR_TRANSPORT_ERROR;
} }
...@@ -438,7 +443,8 @@ int Ssfdc_D_ReadRedtData(struct us_data *us, BYTE *redundant) ...@@ -438,7 +443,8 @@ int Ssfdc_D_ReadRedtData(struct us_data *us, BYTE *redundant)
result = ENE_LoadBinCode(us, SM_RW_PATTERN); result = ENE_LoadBinCode(us, SM_RW_PATTERN);
if (result != USB_STOR_XFER_GOOD) { if (result != USB_STOR_XFER_GOOD) {
dev_err(&us->pusb_dev->dev, "Load SM RW Code Fail !!\n"); dev_err(&us->pusb_dev->dev,
"Failed to load SmartMedia read/write code\n");
return USB_STOR_TRANSPORT_ERROR; return USB_STOR_TRANSPORT_ERROR;
} }
...@@ -477,7 +483,8 @@ int Ssfdc_D_WriteRedtData(struct us_data *us, BYTE *redundant) ...@@ -477,7 +483,8 @@ int Ssfdc_D_WriteRedtData(struct us_data *us, BYTE *redundant)
result = ENE_LoadBinCode(us, SM_RW_PATTERN); result = ENE_LoadBinCode(us, SM_RW_PATTERN);
if (result != USB_STOR_XFER_GOOD) { if (result != USB_STOR_XFER_GOOD) {
dev_err(&us->pusb_dev->dev, "Load SM RW Code Fail !!\n"); dev_err(&us->pusb_dev->dev,
"Failed to load SmartMedia read/write code\n");
return USB_STOR_TRANSPORT_ERROR; return USB_STOR_TRANSPORT_ERROR;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment