Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net

Minor conflict in r8169, bug fix had two versions in net
and net-next, take the net-next hunks.

Signed-off-by: David S. Miller <davem@davemloft.net>
Šī revīzija ir iekļauta:
David S. Miller
2019-08-27 14:23:31 -07:00
revīzija 68aaf44595
279 mainīti faili ar 2599 papildinājumiem un 1287 dzēšanām

Parādīt failu

@@ -54,7 +54,7 @@ static void ncsi_cmd_build_header(struct ncsi_pkt_hdr *h,
checksum = ncsi_calculate_checksum((unsigned char *)h,
sizeof(*h) + nca->payload);
pchecksum = (__be32 *)((void *)h + sizeof(struct ncsi_pkt_hdr) +
nca->payload);
ALIGN(nca->payload, 4));
*pchecksum = htonl(checksum);
}
@@ -309,14 +309,21 @@ static struct ncsi_request *ncsi_alloc_command(struct ncsi_cmd_arg *nca)
int ncsi_xmit_cmd(struct ncsi_cmd_arg *nca)
{
struct ncsi_request *nr;
struct ethhdr *eh;
struct ncsi_cmd_handler *nch = NULL;
struct ncsi_request *nr;
unsigned char type;
struct ethhdr *eh;
int i, ret;
/* Use OEM generic handler for Netlink request */
if (nca->req_flags == NCSI_REQ_FLAG_NETLINK_DRIVEN)
type = NCSI_PKT_CMD_OEM;
else
type = nca->type;
/* Search for the handler */
for (i = 0; i < ARRAY_SIZE(ncsi_cmd_handlers); i++) {
if (ncsi_cmd_handlers[i].type == nca->type) {
if (ncsi_cmd_handlers[i].type == type) {
if (ncsi_cmd_handlers[i].handler)
nch = &ncsi_cmd_handlers[i];
else

Parādīt failu

@@ -47,7 +47,8 @@ static int ncsi_validate_rsp_pkt(struct ncsi_request *nr,
if (ntohs(h->code) != NCSI_PKT_RSP_C_COMPLETED ||
ntohs(h->reason) != NCSI_PKT_RSP_R_NO_ERROR) {
netdev_dbg(nr->ndp->ndev.dev,
"NCSI: non zero response/reason code\n");
"NCSI: non zero response/reason code %04xh, %04xh\n",
ntohs(h->code), ntohs(h->reason));
return -EPERM;
}
@@ -55,7 +56,7 @@ static int ncsi_validate_rsp_pkt(struct ncsi_request *nr,
* sender doesn't support checksum according to NCSI
* specification.
*/
pchecksum = (__be32 *)((void *)(h + 1) + payload - 4);
pchecksum = (__be32 *)((void *)(h + 1) + ALIGN(payload, 4) - 4);
if (ntohl(*pchecksum) == 0)
return 0;
@@ -63,7 +64,9 @@ static int ncsi_validate_rsp_pkt(struct ncsi_request *nr,
sizeof(*h) + payload - 4);
if (*pchecksum != htonl(checksum)) {
netdev_dbg(nr->ndp->ndev.dev, "NCSI: checksum mismatched\n");
netdev_dbg(nr->ndp->ndev.dev,
"NCSI: checksum mismatched; recd: %08x calc: %08x\n",
*pchecksum, htonl(checksum));
return -EINVAL;
}