Fixed bug 3522808, fixed problem with STM32 MAC driver checksum offload.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@4156 35acf78f-673a-0410-8e92-d51de3d6d3f4master
parent
d317bf915a
commit
8ed6a8d9e3
|
@ -288,7 +288,7 @@ void mac_lld_stop(MACDriver *macp) {
|
|||
*
|
||||
* @notapi
|
||||
*/
|
||||
msg_t max_lld_get_transmit_descriptor(MACDriver *macp,
|
||||
msg_t mac_lld_get_transmit_descriptor(MACDriver *macp,
|
||||
MACTransmitDescriptor *tdp) {
|
||||
EMACDescriptor *edp;
|
||||
|
||||
|
@ -378,7 +378,7 @@ void mac_lld_release_transmit_descriptor(MACTransmitDescriptor *tdp) {
|
|||
*
|
||||
* @notapi
|
||||
*/
|
||||
msg_t max_lld_get_receive_descriptor(MACDriver *macp,
|
||||
msg_t mac_lld_get_receive_descriptor(MACDriver *macp,
|
||||
MACReceiveDescriptor *rdp) {
|
||||
unsigned n;
|
||||
EMACDescriptor *edp;
|
||||
|
|
|
@ -227,13 +227,13 @@ extern "C" {
|
|||
void mac_lld_init(void);
|
||||
void mac_lld_start(MACDriver *macp);
|
||||
void mac_lld_stop(MACDriver *macp);
|
||||
msg_t max_lld_get_transmit_descriptor(MACDriver *macp,
|
||||
msg_t mac_lld_get_transmit_descriptor(MACDriver *macp,
|
||||
MACTransmitDescriptor *tdp);
|
||||
size_t mac_lld_write_transmit_descriptor(MACTransmitDescriptor *tdp,
|
||||
uint8_t *buf,
|
||||
size_t size);
|
||||
void mac_lld_release_transmit_descriptor(MACTransmitDescriptor *tdp);
|
||||
msg_t max_lld_get_receive_descriptor(MACDriver *macp,
|
||||
msg_t mac_lld_get_receive_descriptor(MACDriver *macp,
|
||||
MACReceiveDescriptor *rdp);
|
||||
size_t mac_lld_read_receive_descriptor(MACReceiveDescriptor *rdp,
|
||||
uint8_t *buf,
|
||||
|
|
|
@ -384,7 +384,7 @@ void mac_lld_stop(MACDriver *macp) {
|
|||
*
|
||||
* @notapi
|
||||
*/
|
||||
msg_t max_lld_get_transmit_descriptor(MACDriver *macp,
|
||||
msg_t mac_lld_get_transmit_descriptor(MACDriver *macp,
|
||||
MACTransmitDescriptor *tdp) {
|
||||
stm32_eth_tx_descriptor_t *tdes;
|
||||
|
||||
|
@ -493,7 +493,7 @@ void mac_lld_release_transmit_descriptor(MACTransmitDescriptor *tdp) {
|
|||
*
|
||||
* @notapi
|
||||
*/
|
||||
msg_t max_lld_get_receive_descriptor(MACDriver *macp,
|
||||
msg_t mac_lld_get_receive_descriptor(MACDriver *macp,
|
||||
MACReceiveDescriptor *rdp) {
|
||||
stm32_eth_rx_descriptor_t *rdes;
|
||||
|
||||
|
@ -505,12 +505,12 @@ msg_t max_lld_get_receive_descriptor(MACDriver *macp,
|
|||
/* Iterates through received frames until a valid one is found, invalid
|
||||
frames are discarded.*/
|
||||
while (!(rdes->rdes0 & STM32_RDES0_OWN)) {
|
||||
if (!(rdes->rdes0 & (STM32_RDES0_AFM | STM32_RDES0_ES
|
||||
if (!(rdes->rdes0 & (STM32_RDES0_AFM | STM32_RDES0_ES))
|
||||
#if STM32_IP_CHECKSUM_OFFLOAD
|
||||
| STM32_RDES0_IPHCE | STM32_RDES0_PCE
|
||||
&& !(rdes->rdes0 & STM32_RDES0_FT & (STM32_RDES0_IPHCE |
|
||||
STM32_RDES0_PCE))
|
||||
#endif
|
||||
)) && (rdes->rdes0 & STM32_RDES0_FS) &&
|
||||
(rdes->rdes0 & STM32_RDES0_LS)) {
|
||||
&& (rdes->rdes0 & STM32_RDES0_FS) && (rdes->rdes0 & STM32_RDES0_LS)) {
|
||||
/* Found a valid one.*/
|
||||
rdp->offset = 0;
|
||||
rdp->size = ((rdes->rdes0 & STM32_RDES0_FL_MASK) >> 16) - 4;
|
||||
|
|
|
@ -323,13 +323,13 @@ extern "C" {
|
|||
void mac_lld_init(void);
|
||||
void mac_lld_start(MACDriver *macp);
|
||||
void mac_lld_stop(MACDriver *macp);
|
||||
msg_t max_lld_get_transmit_descriptor(MACDriver *macp,
|
||||
msg_t mac_lld_get_transmit_descriptor(MACDriver *macp,
|
||||
MACTransmitDescriptor *tdp);
|
||||
size_t mac_lld_write_transmit_descriptor(MACTransmitDescriptor *tdp,
|
||||
uint8_t *buf,
|
||||
size_t size);
|
||||
void mac_lld_release_transmit_descriptor(MACTransmitDescriptor *tdp);
|
||||
msg_t max_lld_get_receive_descriptor(MACDriver *macp,
|
||||
msg_t mac_lld_get_receive_descriptor(MACDriver *macp,
|
||||
MACReceiveDescriptor *rdp);
|
||||
size_t mac_lld_read_receive_descriptor(MACReceiveDescriptor *rdp,
|
||||
uint8_t *buf,
|
||||
|
|
|
@ -153,7 +153,7 @@ msg_t macWaitTransmitDescriptor(MACDriver *macp,
|
|||
chDbgAssert(macp->state == MAC_ACTIVE, "macWaitTransmitDescriptor(), #1",
|
||||
"not active");
|
||||
|
||||
while (((msg = max_lld_get_transmit_descriptor(macp, tdp)) != RDY_OK) &&
|
||||
while (((msg = mac_lld_get_transmit_descriptor(macp, tdp)) != RDY_OK) &&
|
||||
(time > 0)) {
|
||||
chSysLock();
|
||||
systime_t now = chTimeNow();
|
||||
|
@ -211,7 +211,7 @@ msg_t macWaitReceiveDescriptor(MACDriver *macp,
|
|||
chDbgAssert(macp->state == MAC_ACTIVE, "macWaitReceiveDescriptor(), #1",
|
||||
"not active");
|
||||
|
||||
while (((msg = max_lld_get_receive_descriptor(macp, rdp)) != RDY_OK) &&
|
||||
while (((msg = mac_lld_get_receive_descriptor(macp, rdp)) != RDY_OK) &&
|
||||
(time > 0)) {
|
||||
chSysLock();
|
||||
systime_t now = chTimeNow();
|
||||
|
|
|
@ -104,7 +104,7 @@ void mac_lld_stop(MACDriver *macp) {
|
|||
*
|
||||
* @notapi
|
||||
*/
|
||||
msg_t max_lld_get_transmit_descriptor(MACDriver *macp,
|
||||
msg_t mac_lld_get_transmit_descriptor(MACDriver *macp,
|
||||
MACTransmitDescriptor *tdp) {
|
||||
|
||||
return RDY_OK;
|
||||
|
@ -154,7 +154,7 @@ void mac_lld_release_transmit_descriptor(MACTransmitDescriptor *tdp) {
|
|||
*
|
||||
* @notapi
|
||||
*/
|
||||
msg_t max_lld_get_receive_descriptor(MACDriver *macp,
|
||||
msg_t mac_lld_get_receive_descriptor(MACDriver *macp,
|
||||
MACReceiveDescriptor *rdp) {
|
||||
|
||||
return RDY_TIMEOUT;
|
||||
|
|
|
@ -135,13 +135,13 @@ extern "C" {
|
|||
void mac_lld_init(void);
|
||||
void mac_lld_start(MACDriver *macp);
|
||||
void mac_lld_stop(MACDriver *macp);
|
||||
msg_t max_lld_get_transmit_descriptor(MACDriver *macp,
|
||||
msg_t mac_lld_get_transmit_descriptor(MACDriver *macp,
|
||||
MACTransmitDescriptor *tdp);
|
||||
size_t mac_lld_write_transmit_descriptor(MACTransmitDescriptor *tdp,
|
||||
uint8_t *buf,
|
||||
size_t size);
|
||||
void mac_lld_release_transmit_descriptor(MACTransmitDescriptor *tdp);
|
||||
msg_t max_lld_get_receive_descriptor(MACDriver *macp,
|
||||
msg_t mac_lld_get_receive_descriptor(MACDriver *macp,
|
||||
MACReceiveDescriptor *rdp);
|
||||
size_t mac_lld_read_receive_descriptor(MACReceiveDescriptor *rdp,
|
||||
uint8_t *buf,
|
||||
|
|
|
@ -79,6 +79,8 @@
|
|||
*****************************************************************************
|
||||
|
||||
*** 2.5.0 ***
|
||||
- FIX: Fixed MAC driver functions with invalid name (bug 3522808)(backported
|
||||
to 2.2.10 and 2.4.1).
|
||||
- FIX: Fixed code coverage crashes with Linux/gcc-4.4.5 (bug 3522301)
|
||||
(backported to 2.4.1).
|
||||
- FIX: Fixed macro dmaWaitCompletion() fails to compile in STM32 HAL (bug
|
||||
|
|
|
@ -236,6 +236,7 @@ static const USBEndpointConfig ep1config = {
|
|||
0x0040,
|
||||
0x0000,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL
|
||||
};
|
||||
|
||||
|
@ -250,6 +251,7 @@ static const USBEndpointConfig ep2config = {
|
|||
0x0010,
|
||||
0x0000,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL
|
||||
};
|
||||
|
||||
|
@ -264,6 +266,7 @@ static const USBEndpointConfig ep3config = {
|
|||
0x0000,
|
||||
0x0040,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue