+2010-10-02 Aleš Nesrsta <starous@volny.cz>
+
+ * grub-core/bus/usb/ohci.c, grub-core/bus/usb/uhci.c:
+ Increased number of TDs.
+ * grub-core/bus/usb/usbtrans.c (grub_usb_bulk_setup_readwrite):
+ Corrected endpoint maxpacket size.
+
2010-10-01 Vladimir Serbinenko <phcoder@gmail.com>
Clear out 0x80 color bit on EFI.
#define GRUB_OHCI_RESET_CONNECT_CHANGE (1 << 16)
#define GRUB_OHCI_CTRL_EDS 256
#define GRUB_OHCI_BULK_EDS 510
-#define GRUB_OHCI_TDS 256
+#define GRUB_OHCI_TDS 640
#define GRUB_OHCI_ED_ADDR_MASK 0x7ff
#define GRUB_UHCI_IOMASK (0x7FF << 5)
#define N_QH 256
+#define N_TD 640
typedef enum
{
/* N_QH Queue Heads. */
grub_uhci_qh_t qh;
- /* 256 Transfer Descriptors. */
+ /* N_TD Transfer Descriptors. */
grub_uhci_td_t td;
/* Free Transfer Descriptors. */
/* The QH pointer of UHCI is only 32 bits, make sure this
code works on on 64 bits architectures. */
- u->qh = (grub_uhci_qh_t) grub_memalign (4096, 4096);
+ u->qh = (grub_uhci_qh_t) grub_memalign (4096, sizeof(struct grub_uhci_qh)*N_QH);
if (! u->qh)
goto fail;
/* The TD pointer of UHCI is only 32 bits, make sure this
code works on on 64 bits architectures. */
- u->td = (grub_uhci_td_t) grub_memalign (4096, 4096*2);
+ u->td = (grub_uhci_td_t) grub_memalign (4096, sizeof(struct grub_uhci_td)*N_TD);
if (! u->td)
goto fail;
/* Link all Transfer Descriptors in a list of available Transfer
Descriptors. */
- for (i = 0; i < 256; i++)
+ for (i = 0; i < N_TD; i++)
u->td[i].linkptr = (grub_uint32_t) (grub_addr_t) &u->td[i + 1];
- u->td[255 - 1].linkptr = 0;
+ u->td[N_TD - 2].linkptr = 0;
u->tdfree = u->td;
/* Make sure UHCI is disabled! */
if (dev->initialized)
{
struct grub_usb_desc_endp *endpdesc;
- endpdesc = grub_usb_get_endpdescriptor (dev, 0);
+ endpdesc = grub_usb_get_endpdescriptor (dev, endpoint);
if (endpdesc)
max = endpdesc->maxpacket;