"depression, ill-humor," 1743, probably originally Scottish and northern English, earlier as a verb, "panic, fail through panic," (1737), said to be 17c. Oxford University slang, perhaps from Flem. fonck "perturbation, agitation, distress," possibly related to O.Fr. funicle "wild, mad."
"bad smell," 1623, from dial. Fr. funkière "smoke," from O.Fr. fungier "give off smoke," from L. fumigare "to smoke." In reference to a style of music, it is first attested 1959, a back formation of funky. Funky was originally "old, musty" (1784), in reference to cheeses, then "repulsive," but began to develop an approving sense in jazz slang c.1900, probably on the notion of "earthy, strong, deeply felt." Funky also was used early 20c. by white writers in ref. to body odor allegedly peculiar to blacks. The word reached wider popularity c.1954 (e.g. definition in "Time" magazine, Nov. 8, 1954) and in the 1960s acquired a broad slang sense of "fine, stylish, excellent."