[S] Change in osmo-e1-hardware[master]: icE1usb fw: Use proper length for struct usb_cdc_notif_serial_state
tnt has submitted this change. ( https://gerrit.osmocom.org/c/osmo-e1-hardware/+/36185?usp=email ) Change subject: icE1usb fw: Use proper length for struct usb_cdc_notif_serial_state .. icE1usb fw: Use proper length for struct usb_cdc_notif_serial_state Signed-off-by: Sylvain Munaut Change-Id: I30d451e76ebd192f037653179b6485b2b43b6dbc --- M firmware/ice40-riscv/icE1usb/usb_gps.c 1 file changed, 15 insertions(+), 4 deletions(-) Approvals: laforge: Looks good to me, but someone else must approve Jenkins Builder: Verified tnt: Looks good to me, approved diff --git a/firmware/ice40-riscv/icE1usb/usb_gps.c b/firmware/ice40-riscv/icE1usb/usb_gps.c index db188b1..ad893a5 100644 --- a/firmware/ice40-riscv/icE1usb/usb_gps.c +++ b/firmware/ice40-riscv/icE1usb/usb_gps.c @@ -148,6 +148,7 @@ }, .bits = 0x00 }; + const int notif_len = sizeof(struct usb_cdc_notif_serial_state); /* Check if PPS occurred */ uint32_t pps_now = time_pps_read(); @@ -159,8 +160,8 @@ /* Queue CD Set */ notif.bits = 1; - usb_data_write(ep_regs->bd[0].ptr, , 12); - ep_regs->bd[0].csr = USB_BD_STATE_RDY_DATA | USB_BD_LEN(10); + usb_data_write(ep_regs->bd[0].ptr, , notif_len); + ep_regs->bd[0].csr = USB_BD_STATE_RDY_DATA | USB_BD_LEN(notif_len); /* Need to clear in the future */ g_usb_gps.pps.set = true; @@ -169,8 +170,8 @@ { /* Queue CD Clear */ notif.bits = 0; - usb_data_write(ep_regs->bd[0].ptr, , 12); - ep_regs->bd[0].csr = USB_BD_STATE_RDY_DATA | USB_BD_LEN(10); + usb_data_write(ep_regs->bd[0].ptr, , notif_len); + ep_regs->bd[0].csr = USB_BD_STATE_RDY_DATA | USB_BD_LEN(notif_len); /* Cleared */ g_usb_gps.pps.set = false; -- To view, visit https://gerrit.osmocom.org/c/osmo-e1-hardware/+/36185?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-e1-hardware Gerrit-Branch: master Gerrit-Change-Id: I30d451e76ebd192f037653179b6485b2b43b6dbc Gerrit-Change-Number: 36185 Gerrit-PatchSet: 2 Gerrit-Owner: tnt Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: tnt Gerrit-MessageType: merged
[S] Change in osmo-e1-hardware[master]: icE1usb fw: Use proper length for struct usb_cdc_notif_serial_state
tnt has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-e1-hardware/+/36185?usp=email ) Change subject: icE1usb fw: Use proper length for struct usb_cdc_notif_serial_state .. Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-e1-hardware/+/36185?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-e1-hardware Gerrit-Branch: master Gerrit-Change-Id: I30d451e76ebd192f037653179b6485b2b43b6dbc Gerrit-Change-Number: 36185 Gerrit-PatchSet: 2 Gerrit-Owner: tnt Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: tnt Gerrit-Comment-Date: Thu, 07 Mar 2024 10:06:41 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
[S] Change in osmo-e1-hardware[master]: icE1usb fw: Use proper length for struct usb_cdc_notif_serial_state
Attention is currently required from: tnt. laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-e1-hardware/+/36185?usp=email ) Change subject: icE1usb fw: Use proper length for struct usb_cdc_notif_serial_state .. Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-e1-hardware/+/36185?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-e1-hardware Gerrit-Branch: master Gerrit-Change-Id: I30d451e76ebd192f037653179b6485b2b43b6dbc Gerrit-Change-Number: 36185 Gerrit-PatchSet: 2 Gerrit-Owner: tnt Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Attention: tnt Gerrit-Comment-Date: Thu, 07 Mar 2024 09:55:59 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
[S] Change in osmo-e1-hardware[master]: icE1usb fw: Use proper length for struct usb_cdc_notif_serial_state
tnt has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-e1-hardware/+/36185?usp=email ) Change subject: icE1usb fw: Use proper length for struct usb_cdc_notif_serial_state .. icE1usb fw: Use proper length for struct usb_cdc_notif_serial_state Signed-off-by: Sylvain Munaut Change-Id: I30d451e76ebd192f037653179b6485b2b43b6dbc --- M firmware/ice40-riscv/icE1usb/usb_gps.c 1 file changed, 15 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-e1-hardware refs/changes/85/36185/1 diff --git a/firmware/ice40-riscv/icE1usb/usb_gps.c b/firmware/ice40-riscv/icE1usb/usb_gps.c index db188b1..ad893a5 100644 --- a/firmware/ice40-riscv/icE1usb/usb_gps.c +++ b/firmware/ice40-riscv/icE1usb/usb_gps.c @@ -148,6 +148,7 @@ }, .bits = 0x00 }; + const int notif_len = sizeof(struct usb_cdc_notif_serial_state); /* Check if PPS occurred */ uint32_t pps_now = time_pps_read(); @@ -159,8 +160,8 @@ /* Queue CD Set */ notif.bits = 1; - usb_data_write(ep_regs->bd[0].ptr, , 12); - ep_regs->bd[0].csr = USB_BD_STATE_RDY_DATA | USB_BD_LEN(10); + usb_data_write(ep_regs->bd[0].ptr, , notif_len); + ep_regs->bd[0].csr = USB_BD_STATE_RDY_DATA | USB_BD_LEN(notif_len); /* Need to clear in the future */ g_usb_gps.pps.set = true; @@ -169,8 +170,8 @@ { /* Queue CD Clear */ notif.bits = 0; - usb_data_write(ep_regs->bd[0].ptr, , 12); - ep_regs->bd[0].csr = USB_BD_STATE_RDY_DATA | USB_BD_LEN(10); + usb_data_write(ep_regs->bd[0].ptr, , notif_len); + ep_regs->bd[0].csr = USB_BD_STATE_RDY_DATA | USB_BD_LEN(notif_len); /* Cleared */ g_usb_gps.pps.set = false; -- To view, visit https://gerrit.osmocom.org/c/osmo-e1-hardware/+/36185?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-e1-hardware Gerrit-Branch: master Gerrit-Change-Id: I30d451e76ebd192f037653179b6485b2b43b6dbc Gerrit-Change-Number: 36185 Gerrit-PatchSet: 1 Gerrit-Owner: tnt Gerrit-MessageType: newchange