From linux-kernel@vger.kernel.org Thu Dec 18 21:38:26 2003 Date: Fri, 12 Dec 2003 18:18:02 +0000 From: Linux Kernel Mailing List To: bk-commits-24@vger.kernel.org Subject: [PATCH] USB: fix bug when errors happen in ioedgeport driver ChangeSet 1.1286, 2003/12/12 10:18:02-08:00, tchen@on-go.com [PATCH] USB: fix bug when errors happen in ioedgeport driver # This patch includes the following deltas: # ChangeSet 1.1285 -> 1.1286 # drivers/usb/serial/io_edgeport.c 1.26 -> 1.27 # io_edgeport.c | 12 ++++++++---- 1 files changed, 8 insertions(+), 4 deletions(-) diff -Nru a/drivers/usb/serial/io_edgeport.c b/drivers/usb/serial/io_edgeport.c --- a/drivers/usb/serial/io_edgeport.c Mon Dec 15 07:03:23 2003 +++ b/drivers/usb/serial/io_edgeport.c Mon Dec 15 07:03:23 2003 @@ -1468,15 +1468,19 @@ urb->transfer_flags |= USB_QUEUE_BULK; urb->dev = edge_serial->serial->dev; + /* decrement the number of credits we have by the number we just sent */ + edge_port->txCredits -= count; + edge_port->icount.tx += count; + status = usb_submit_urb(urb); if (status) { /* something went wrong */ dbg("%s - usb_submit_urb(write bulk) failed", __FUNCTION__); edge_port->write_in_progress = FALSE; - } else { - /* decrement the number of credits we have by the number we just sent */ - edge_port->txCredits -= count; - edge_port->icount.tx += count; + + /*revert the count if something bad happened...*/ + edge_port->txCredits += count; + edge_port->icount.tx -= count; } dbg("%s wrote %d byte(s) TxCredit %d, Fifo %d", __FUNCTION__, count, edge_port->txCredits, fifo->count); } - To unsubscribe from this list: send the line "unsubscribe bk-commits-24" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html From linux-kernel@vger.kernel.org Thu Dec 18 21:39:10 2003 Date: Fri, 12 Dec 2003 18:18:22 +0000 From: Linux Kernel Mailing List To: bk-commits-24@vger.kernel.org Subject: [PATCH] USB: fix io_edgeport driver alignment issues. ChangeSet 1.1287, 2003/12/12 10:18:22-08:00, tchen@on-go.com [PATCH] USB: fix io_edgeport driver alignment issues. # This patch includes the following deltas: # ChangeSet 1.1286 -> 1.1287 # drivers/usb/serial/io_fw_boot2.h 1.3 -> 1.4 # drivers/usb/serial/io_fw_down2.h 1.3 -> 1.4 # drivers/usb/serial/io_fw_down.h 1.3 -> 1.4 # drivers/usb/serial/io_fw_boot.h 1.3 -> 1.4 # io_fw_boot.h | 2 +- io_fw_boot2.h | 2 +- io_fw_down.h | 2 +- io_fw_down2.h | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff -Nru a/drivers/usb/serial/io_fw_boot.h b/drivers/usb/serial/io_fw_boot.h --- a/drivers/usb/serial/io_fw_boot.h Mon Dec 15 07:03:25 2003 +++ b/drivers/usb/serial/io_fw_boot.h Mon Dec 15 07:03:25 2003 @@ -17,7 +17,7 @@ unsigned short Addr; unsigned short Len; unsigned char Data[0]; - }; + } __attribute__ ((packed)); struct edge_firmware_version_info { unsigned char MajorVersion; diff -Nru a/drivers/usb/serial/io_fw_boot2.h b/drivers/usb/serial/io_fw_boot2.h --- a/drivers/usb/serial/io_fw_boot2.h Mon Dec 15 07:03:25 2003 +++ b/drivers/usb/serial/io_fw_boot2.h Mon Dec 15 07:03:25 2003 @@ -17,7 +17,7 @@ unsigned short Addr; unsigned short Len; unsigned char Data[0]; - }; + } __attribute__ ((packed)); struct edge_firmware_version_info { unsigned char MajorVersion; diff -Nru a/drivers/usb/serial/io_fw_down.h b/drivers/usb/serial/io_fw_down.h --- a/drivers/usb/serial/io_fw_down.h Mon Dec 15 07:03:25 2003 +++ b/drivers/usb/serial/io_fw_down.h Mon Dec 15 07:03:25 2003 @@ -17,7 +17,7 @@ unsigned short Addr; unsigned short Len; unsigned char Data[0]; - }; + } __attribute ((packed)); struct edge_firmware_version_info { unsigned char MajorVersion; diff -Nru a/drivers/usb/serial/io_fw_down2.h b/drivers/usb/serial/io_fw_down2.h --- a/drivers/usb/serial/io_fw_down2.h Mon Dec 15 07:03:25 2003 +++ b/drivers/usb/serial/io_fw_down2.h Mon Dec 15 07:03:25 2003 @@ -17,7 +17,7 @@ unsigned short Addr; unsigned short Len; unsigned char Data[0]; - }; + } __attribute__ ((packed)); struct edge_firmware_version_info { unsigned char MajorVersion; - To unsubscribe from this list: send the line "unsubscribe bk-commits-24" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html