Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit776e3f2

Browse files
committed
inherit the controller product details similar to windows/macos.
1 parent2248c66 commit776e3f2

File tree

3 files changed

+18
-15
lines changed

3 files changed

+18
-15
lines changed

‎rom/usb/pciusb/pciusb.h‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,9 @@ struct PCIController
182182
OOP_Object*hc_PCIDeviceObject;
183183
OOP_Object*hc_PCIDriverObject;
184184

185+
UWORDhc_VendID;
186+
UWORDhc_ProdID;
187+
185188
#if defined(USE_FAST_PCICFG)
186189
OOP_MethodFunchc_ReadConfigByte;
187190
OOP_Class*hc_ReadConfigByte_Class;

‎rom/usb/pciusb/pciusb_arospci.c‎

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,10 @@ static void handleQuirks(struct PCIController *hc)
5555
OOP_GetAttr(hc->hc_PCIDeviceObject,aHidd_PCIDevice_SubsystemVendorID,&subvendorid);
5656
OOP_GetAttr(hc->hc_PCIDeviceObject,aHidd_PCIDevice_SubsystemID,&subproductid);
5757
OOP_GetAttr(hc->hc_PCIDeviceObject,aHidd_PCIDevice_Size0,&memsize);
58+
59+
hc->hc_VendID= (UWORD)vendorid&0xFFFF;
60+
hc->hc_ProdID= (UWORD)productid&0xFFFF;
61+
5862
if (vendorid==0x8086&&productid==0x265c&&revisionid==0
5963
&&subvendorid==0&&subproductid==0&&memsize==4096)
6064
{
@@ -314,15 +318,12 @@ BOOL pciInit(struct PCIDevice *hd)
314318
{
315319
structTagItemusbc_tags[]=
316320
{
317-
{aHidd_Name,0 },
318-
{aHidd_HardwareName,0 },
319-
{aHidd_Producer,0 },
320-
#defineUSB_TAG_VEND2
321-
{aHidd_Product,0 },
322-
#defineUSB_TAG_PROD3
323-
{aHidd_DriverData,0 },
324-
#defineUSB_TAG_DATA4
325-
{TAG_DONE,0 }
321+
{aHidd_Name,0 },
322+
{aHidd_HardwareName,0 },
323+
{aHidd_Producer,hc->hc_VendID },
324+
{aHidd_Product,hc->hc_ProdID },
325+
{aHidd_DriverData,0 },
326+
{TAG_DONE,0 }
326327
};
327328
char*usb_chipset="UHCI";
328329
intusb_min=-1,usb_maj=1;
@@ -332,9 +333,6 @@ BOOL pciInit(struct PCIDevice *hd)
332333
sprintf(hc->hc_Node.ln_Name,"pciusb.device/%u", (hu->hu_UnitNo& ~PCIUSBUNIT_MASK));
333334
usbc_tags[0].ti_Data= (IPTR)hc->hc_Node.ln_Name;
334335

335-
usbc_tags[USB_TAG_VEND].ti_Data=0;
336-
usbc_tags[USB_TAG_PROD].ti_Data=hu->hu_DevID;
337-
338336
usbc_tags[1].ti_Data= (IPTR)&hc->hc_Node.ln_Name[16];
339337
switch (hc->hc_HCIType)
340338
{

‎rom/usb/pciusb/uhwcmd.c‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -610,11 +610,14 @@ WORD cmdControlXFerRootHub(struct IOUsbHWReq *ioreq,
610610
CopyMem((APTR)&RHDevDesc,ioreq->iouh_Data,ioreq->iouh_Actual);
611611
if(ioreq->iouh_Length >=sizeof(structUsbStdDevDesc))
612612
{
613-
#if defined(PCIUSB_ENABLEXHCI)
613+
structUsbStdDevDesc*usdd= (structUsbStdDevDesc*)ioreq->iouh_Data;
614614
hc= (structPCIController*)unit->hu_Controllers.lh_Head;
615+
usdd->idVendor=WORD2LE(hc->hc_VendID);
616+
usdd->idProduct=WORD2LE(hc->hc_ProdID);
617+
618+
#if defined(PCIUSB_ENABLEXHCI)
615619
if((hc->hc_HCIType==HCITYPE_XHCI)&& (unit->hu_RootHubXPorts))
616620
{
617-
structUsbStdDevDesc*usdd= (structUsbStdDevDesc*)ioreq->iouh_Data;
618621
KPRINTF(1,"RH: XHCI (USB3) Hub Descriptor\n");
619622
usdd->bcdUSB=AROS_WORD2LE(0x0300);/* USB 3.0 */
620623
usdd->bDeviceClass=HUB_CLASSCODE;/* 9 */
@@ -626,7 +629,6 @@ WORD cmdControlXFerRootHub(struct IOUsbHWReq *ioreq,
626629
#endif
627630
if(unit->hu_RootHub20Ports)
628631
{
629-
structUsbStdDevDesc*usdd= (structUsbStdDevDesc*)ioreq->iouh_Data;
630632
KPRINTF(1,"RH: USB2 Hub Descriptor\n");
631633
usdd->bcdUSB=AROS_WORD2LE(0x0200);// signal a highspeed root hub
632634
usdd->bDeviceProtocol=1;// single TT

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp